Tubi for Channels docker

I also noticed a couple [CRITICAL] Scheduler crashed errors in the container log. One 3 days ago and one yesterday.

2024-07-25T02:49:07.680912605Z [INFO] Retriving EPG Data
2024-07-25T02:49:18.045519370Z [CRITICAL] Scheduler crashed: Response ended prematurely. Restarting...
2024-07-27T02:51:11.850817076Z [INFO] Retriving EPG Data
2024-07-27T02:51:20.465476537Z [CRITICAL] Scheduler crashed: Response ended prematurely. Restarting...

Doesn't look like I'm missing any guide data though.

Got the 500 error again this morning when Channels DVR was refreshing the lineup m3u

2024/07/28 09:57:07.929422 [ERR] Unexpected m3u response for tubiTV: 500 INTERNAL SERVER ERROR

Container log shows this

2024-07-28T16:57:00.430907497Z [INFO] Reading channel id list cache
2024-07-28T16:57:00.431699855Z [INFO] Retriving EPG Data
2024-07-28T16:57:07.925737020Z [2024-07-28 16:57:07,878] ERROR in app: Exception on /tubi/playlist.m3u [GET]
2024-07-28T16:57:07.926575705Z Traceback (most recent call last):
2024-07-28T16:57:07.926750542Z   File "/usr/local/lib/python3.12/site-packages/requests/models.py", line 820, in generate
2024-07-28T16:57:07.926895876Z     yield from self.raw.stream(chunk_size, decode_content=True)
2024-07-28T16:57:07.927009106Z   File "/usr/local/lib/python3.12/site-packages/urllib3/response.py", line 1057, in stream
2024-07-28T16:57:07.927122009Z     yield from self.read_chunked(amt, decode_content=decode_content)
2024-07-28T16:57:07.927221473Z   File "/usr/local/lib/python3.12/site-packages/urllib3/response.py", line 1206, in read_chunked
2024-07-28T16:57:07.927376536Z     self._update_chunk_length()
2024-07-28T16:57:07.927500608Z   File "/usr/local/lib/python3.12/site-packages/urllib3/response.py", line 1136, in _update_chunk_length
2024-07-28T16:57:07.927616353Z     raise ProtocolError("Response ended prematurely") from None
2024-07-28T16:57:07.927726286Z urllib3.exceptions.ProtocolError: Response ended prematurely
2024-07-28T16:57:07.927825333Z 
2024-07-28T16:57:07.927908958Z During handling of the above exception, another exception occurred:
2024-07-28T16:57:07.928018884Z 
2024-07-28T16:57:07.928102069Z Traceback (most recent call last):
2024-07-28T16:57:07.928194811Z   File "/usr/local/lib/python3.12/site-packages/flask/app.py", line 1473, in wsgi_app
2024-07-28T16:57:07.928318988Z     response = self.full_dispatch_request()
2024-07-28T16:57:07.928480845Z                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-07-28T16:57:07.928577989Z   File "/usr/local/lib/python3.12/site-packages/flask/app.py", line 882, in full_dispatch_request
2024-07-28T16:57:07.928689347Z     rv = self.handle_user_exception(e)
2024-07-28T16:57:07.929046172Z          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-07-28T16:57:07.929268891Z   File "/usr/local/lib/python3.12/site-packages/flask/app.py", line 880, in full_dispatch_request
2024-07-28T16:57:07.929452161Z     rv = self.dispatch_request()
2024-07-28T16:57:07.929559876Z          ^^^^^^^^^^^^^^^^^^^^^^^
2024-07-28T16:57:07.929732439Z   File "/usr/local/lib/python3.12/site-packages/flask/app.py", line 865, in dispatch_request
2024-07-28T16:57:07.929964591Z     return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-return]
2024-07-28T16:57:07.930123192Z            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-07-28T16:57:07.930215840Z   File "/app/pywsgi.py", line 82, in playlist
2024-07-28T16:57:07.930318690Z     stations, err = providers[provider].channels()
2024-07-28T16:57:07.930506918Z                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-07-28T16:57:07.930602220Z   File "/app/tubi.py", line 148, in channels
2024-07-28T16:57:07.930706315Z     error = self.read_epg()
2024-07-28T16:57:07.930800219Z             ^^^^^^^^^^^^^^^
2024-07-28T16:57:07.930883449Z   File "/app/tubi.py", line 134, in read_epg
2024-07-28T16:57:07.930985210Z     response = session.get(f'https://tubitv.com/oz/epg/programming', params=params)
2024-07-28T16:57:07.931101116Z                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-07-28T16:57:07.931189279Z   File "/usr/local/lib/python3.12/site-packages/requests/sessions.py", line 602, in get
2024-07-28T16:57:07.931296491Z     return self.request("GET", url, **kwargs)
2024-07-28T16:57:07.931458659Z            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-07-28T16:57:07.931555243Z   File "/usr/local/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
2024-07-28T16:57:07.931663755Z     resp = self.send(prep, **send_kwargs)
2024-07-28T16:57:07.931762809Z            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-07-28T16:57:07.931846100Z   File "/usr/local/lib/python3.12/site-packages/requests/sessions.py", line 746, in send
2024-07-28T16:57:07.932005457Z     r.content
2024-07-28T16:57:07.932197982Z   File "/usr/local/lib/python3.12/site-packages/requests/models.py", line 902, in content
2024-07-28T16:57:07.932385138Z     self._content = b"".join(self.iter_content(CONTENT_CHUNK_SIZE)) or b""
2024-07-28T16:57:07.932517116Z                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-07-28T16:57:07.932606944Z   File "/usr/local/lib/python3.12/site-packages/requests/models.py", line 822, in generate
2024-07-28T16:57:07.932720182Z     raise ChunkedEncodingError(e)
2024-07-28T16:57:07.932813326Z requests.exceptions.ChunkedEncodingError: Response ended prematurely
2024-07-28T16:57:07.932113529Z [INFO] Reading channel id list cache
2024-07-28T16:57:07.933019283Z [INFO] Retriving EPG Data
2024-07-28T16:57:11.520794020Z [INFO] Channels: Available EPG data: 167
2024-07-28T16:57:11.867585859Z [INFO] Retriving EPG Data

I just manually refreshed the lineup with no errors.
2024/07/28 12:43:00.561882 [M3U] Refreshed lineup for tubiTV with 124 channels

added some additional error handling in the latest update

Thanks @joagomez
I pulled the latest release and will let you know if any more issues.

Failed refreshing the lineup for tubiTV (/tubi/playlist.m3u?gracenote=include) this morning.

Channels DVR log

2024/08/02 09:55:10.350105 [ERR] Unexpected m3u response for tubiTV: 500 INTERNAL SERVER ERROR

TubiTV container log

2024-08-02T16:55:00.254000680Z [INFO] Reading channel id list cache
2024-08-02T16:55:00.254732877Z [INFO] Retriving EPG Data
2024-08-02T16:55:10.347780626Z [2024-08-02 16:55:10,268] ERROR in app: Exception on /tubi/playlist.m3u [GET]
2024-08-02T16:55:10.348635722Z Traceback (most recent call last):
2024-08-02T16:55:10.348808229Z   File "/usr/local/lib/python3.12/site-packages/flask/app.py", line 1473, in wsgi_app
2024-08-02T16:55:10.348939421Z     response = self.full_dispatch_request()
2024-08-02T16:55:10.349036576Z                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-08-02T16:55:10.349121671Z   File "/usr/local/lib/python3.12/site-packages/flask/app.py", line 883, in full_dispatch_request
2024-08-02T16:55:10.349227273Z     return self.finalize_request(rv)
2024-08-02T16:55:10.349323278Z            ^^^^^^^^^^^^^^^^^^^^^^^^^
2024-08-02T16:55:10.349558294Z   File "/usr/local/lib/python3.12/site-packages/flask/app.py", line 902, in finalize_request
2024-08-02T16:55:10.349784972Z     response = self.make_response(rv)
2024-08-02T16:55:10.350009609Z                ^^^^^^^^^^^^^^^^^^^^^^
2024-08-02T16:55:10.350217855Z   File "/usr/local/lib/python3.12/site-packages/flask/app.py", line 1211, in make_response
2024-08-02T16:55:10.350644314Z     raise TypeError(
2024-08-02T16:55:10.350888146Z TypeError: The view function did not return a valid response. The return type must be a string, dict, list, tuple with headers or status, Response instance, or WSGI callable, but it was a tuple.
2024-08-02T16:55:10.354109593Z [INFO] Reading channel id list cache
2024-08-02T16:55:10.354433513Z [INFO] Retriving EPG Data

added more error handling

2 Likes

Thanks, I pulled v1.03a and will let you know if I see any more errors.

Another error today while refreshing the playlist
DVR log

2024/08/09 09:55:02.876819 [ERR] Unexpected m3u response for tubiTVNoEpg: 500 INTERNAL SERVER ERROR

Tubi container log

2024-08-09T16:55:00.036585530Z [INFO] Reading channel id list cache
2024-08-09T16:55:00.037655809Z [INFO] Retriving EPG Data
2024-08-09T16:55:02.861939480Z [2024-08-09 16:55:02,842] ERROR in app: Exception on /tubi/playlist.m3u [GET]
2024-08-09T16:55:02.862775533Z Traceback (most recent call last):
2024-08-09T16:55:02.863055739Z   File "/usr/local/lib/python3.12/site-packages/flask/app.py", line 1473, in wsgi_app
2024-08-09T16:55:02.863206874Z     response = self.full_dispatch_request()
2024-08-09T16:55:02.863310221Z                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-08-09T16:55:02.863492476Z   File "/usr/local/lib/python3.12/site-packages/flask/app.py", line 883, in full_dispatch_request
2024-08-09T16:55:02.863609999Z     return self.finalize_request(rv)
2024-08-09T16:55:02.863705601Z            ^^^^^^^^^^^^^^^^^^^^^^^^^
2024-08-09T16:55:02.863792080Z   File "/usr/local/lib/python3.12/site-packages/flask/app.py", line 902, in finalize_request
2024-08-09T16:55:02.863894931Z     response = self.make_response(rv)
2024-08-09T16:55:02.863987594Z                ^^^^^^^^^^^^^^^^^^^^^^
2024-08-09T16:55:02.864070674Z   File "/usr/local/lib/python3.12/site-packages/flask/app.py", line 1211, in make_response
2024-08-09T16:55:02.864200550Z     raise TypeError(
2024-08-09T16:55:02.864293683Z TypeError: The view function did not return a valid response. The return type must be a string, dict, list, tuple with headers or status, Response instance, or WSGI callable, but it was a tuple.
2024-08-09T16:55:07.195136310Z [INFO] Reading channel id list cache
2024-08-09T16:55:07.195769839Z [INFO] Retriving EPG Data
2024-08-09T16:55:11.377434955Z [INFO] Channels: Available EPG data: 167
2024-08-09T16:55:11.788043865Z [INFO] Retriving EPG Data

I use a Synology NAS with Docker. When I attempt to load this container (latest from GitHUB). this is Invalid. Does anyone know what I doing wrong? I have the Pluto and Frndly TV Containers running good.

What does that mean? Works for me

Compose

version: '3.9'
services:
  # GitHub home for this project with setup instructions: https://github.com/jgomez177/tubi-for-channels
  # Docker container home for this project: https://ghcr.io/jgomez177/tubi-for-channels
  tubi-for-channels:
    image: ghcr.io/jgomez177/tubi-for-channels:${TAG}
    container_name: tubi-for-channels
    volumes:
      - "/volume1/docker/tubi:/app/tubi_data"
    ports:
      - ${HOST_PORT}:${TUBI_PORT}
    environment:
      - TUBI_PORT=${TUBI_PORT}
    restart: unless-stopped

Environment variables

TAG=latest
HOST_PORT=7779
TUBI_PORT=7777

Clarify- When I download ghcr.io/jgomez177/tubi-for-channels:${TAG}. I get "Invalid Docker Repository"

What are you using to pull the image ?
It should be pulled as ghcr.io/jgomez177/tubi-for-channels:latest

I'm using the create new container, then entering add from URL since this is not in the docker registry.

In what?
I would recommend using portainer

Thanks. I will look into this.

For some reason I've got one Tubi channel missing from my playlist. "At the Movies" from WB does't appear. Is this only on the Gracenote or EPG only playlist instead of the regular Tubi playlist?

I'm seeing "At the Movies" on tubi/playlist.m3u and tubi/playlist.m3u?gracenote=exclude

Hmm. Weird. Not showing up for me. Oh well, not a deal breaker, just strange.

Yes I set up each version of Tubi seperately and that particular channel only shows up on this one with 49 channels:
http://10.0.1.21:7755/tubi/playlist.m3u?gracenote=exclude
That playlist's channels have crappy guide data though. But I figure it's better than zero guide data. After all, it's free.

This other playlist has great guide data for 129 channels via Gracenote:
http://10.0.1.21:7755/tubi/playlist.m3u?gracenote=include

SCR-20240912-mdgb

I alwo created an "automatic" Channel Collection to combine both of these sources into one, just called Tubi. Followed this great tip: Automatic Channel Collections - INCLUDE sources - #9 by fashioncents

1 Like

Thanks much I will give that a shot.