mps-youtube / yewtube

yewtube, forked from mps-youtube , is a Terminal based YouTube player and downloader. No Youtube API key required.
GNU General Public License v3.0
8.14k stars 643 forks source link

No streams available, exception in thread, NoneType object not subscriptable in streams.py #1280

Open kkkaamis opened 4 months ago

kkkaamis commented 4 months ago

Issue

Videos don't play, this error shows up. Sometimes it works, then goes back to not working. _No streams available [1/71>

Exception in thread Thread-2 (_preload): Traceback (most recent call last): File "/usr/lib/python3.11/threading.py", line 1038, in _bootstrap_inner self.run() File "/usr/lib/python3.11/threading.py", line 975, in run self._target(*self._args, **self._kwargs) File "/home/devuan/.local/pipx/venvs/yewtube/lib/python3.11/site-packages/mps_youtube/streams.py", line 196, in _preload get_size(ytid, stream['url'], preloading=True)


TypeError: 'NoneType' object is not subscriptable_

Your Environment

Devuan linux, using pipx and mpv

VanackSabbadium commented 3 months ago

Same here.

Debian Sid, using pipx, mpv, python 3.12.4. Yewtube 2.10.5.

suverino commented 3 months ago

same issue here on two different machines.

Both use following environment: Arch Linux, pipx, python 3.12.4, mpv, Yewtube 2.10.5

avoidik commented 3 months ago

at least audio:

set show_video False
misterfish commented 3 months ago

yewtube has been broken for about 2 weeks, due, I suspect, to a change made by Youtube in how the streams may be accessed. If you do a fresh install of yewtube then you may at least be able to get audio-only default streams.

youtube-dl and ytfzf still work. But ytfzf uses a different URL, which is not optimized for streaming, meaning it often gets stuck buffering, and seeking is a pain.

VanackSabbadium commented 3 months ago

It seems like Yewtube is somehow dead or rarely updated, so i don't think this is gonna be solved in a short time.

Does anyone know an alternative program?

fgaz commented 3 months ago

After a quick look at the source code, I think the issue is not in yewtube itself, but in the youtube-search-python dependency, which is sadly unmaintained.

VanackSabbadium commented 3 months ago

After a quick look at the source code, I think the issue is not in yewtube itself, but in the youtube-search-python dependency, which is sadly unmaintained.

Alright, so we are basically doomed...

thisIsTheFoxe commented 3 months ago

I haven't run into this issue myself, but I did notice a comment about youtube-search-python from a contributor which might be helpful:

youtube-search-python has been archived for months now but its still working. We'll port to another backend .i.e. pytube, invidious api when things will break. For now enjoy!

Originally posted by @iamtalhaasghar in https://github.com/mps-youtube/yewtube/issues/1204#issuecomment-1650398979

Maybe it is time to switch to a new new lib..

fgaz commented 2 months ago

Seems like it's working again (for me at least). Still, without a maintained search library, it's only a matter of time until it stops working once and for all.