Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yewtube: runtime failure #326862

Closed
eclairevoyant opened this issue Jul 13, 2024 · 7 comments
Closed

yewtube: runtime failure #326862

eclairevoyant opened this issue Jul 13, 2024 · 7 comments
Labels
0.kind: bug Something is broken 9.needs: upstream fix This PR needs upstream to change something

Comments

@eclairevoyant
Copy link
Contributor

eclairevoyant commented Jul 13, 2024

Describe the bug

Traceback (most recent call last):
  File "/nix/store/z7xxy35k7620hs6fn6la5fg2lgklv72l-python3-3.12.4/lib/python3.12/threading.py", line 1073, in _bootstrap_inner
    self.run()
  File "/nix/store/z7xxy35k7620hs6fn6la5fg2lgklv72l-python3-3.12.4/lib/python3.12/threading.py", line 1010, in run
    self._target(*self._args, **self._kwargs)
  File "/nix/store/qr6xq92s3yill44gxj2wabcdfp9ir0l8-yewtube-2.10.5/lib/python3.12/site-packages/mps_youtube/streams.py", line 196, in _preload
    get_size(ytid, stream['url'], preloading=True)
                   ~~~~~~^^^^^^^
TypeError: 'NoneType' object is not subscriptable

when selecting a video

Steps To Reproduce

Steps to reproduce the behavior:

  1. run yt
  2. search for a video (/searchstring)
  3. type in 1 and press enter

Expected behavior

no error

Screenshots

n/a

Additional context

seems related to the python 3.12 changes, but I didn't bisect

Notify maintainers

@fgaz @k0ral

Metadata

tested on current master (4c68bf5)


Add a 👍 reaction to issues you find important.

@eclairevoyant eclairevoyant added the 0.kind: bug Something is broken label Jul 13, 2024
@fgaz
Copy link
Member

fgaz commented Jul 15, 2024

Could you check whether yt-dlp works on the same video? yewtube uses that to get the stream

@eclairevoyant
Copy link
Contributor Author

It was working fine with mpv (which also uses yt-dlp in my setup).
In any case... it seems to be working now, sorry for the noise.

@eclairevoyant eclairevoyant closed this as not planned Won't fix, can't repro, duplicate, stale Jul 15, 2024
@eclairevoyant
Copy link
Contributor Author

eclairevoyant commented Aug 8, 2024

The ghosts have returned...

Here's an example:

  1. search user bobbialthoff
  2. play the first video (has Matt Rife in the title)

yewtube errors at both steps

mpv 'https://www.youtube.com/watch?v=_hQWw95rjm8' and yt-dlp 'https://www.youtube.com/watch?v=_hQWw95rjm8' work fine

@eclairevoyant eclairevoyant reopened this Aug 8, 2024
@fgaz
Copy link
Member

fgaz commented Aug 8, 2024

The upstream issue seems to be mps-youtube/yewtube#1280

Playing just the audio as suggested here works

@fgaz fgaz added the 9.needs: upstream fix This PR needs upstream to change something label Aug 8, 2024
@eclairevoyant
Copy link
Contributor Author

eclairevoyant commented Aug 8, 2024

In that case I surmise they're not using yt-dlp at all, and trying to roll their own extraction mechanism, in which case we'd eventually have to drop the package.

@fgaz
Copy link
Member

fgaz commented Aug 8, 2024

It does use yt-dlp. However I think the issue is the youtube-search-python dependency, which is sadly unmaintained. Yewtube can't get to the point where it calls yt-dlp because it fails at the search stage.

The yewtube maintainer expressed their opinion about youtube-search-python here: mps-youtube/yewtube#1040 (comment)

So it looks like it might get fixed at some point

@eclairevoyant eclairevoyant closed this as not planned Won't fix, can't repro, duplicate, stale Sep 10, 2024
@fgaz
Copy link
Member

fgaz commented Sep 10, 2024

:O it started working again on its own

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken 9.needs: upstream fix This PR needs upstream to change something
Projects
None yet
Development

No branches or pull requests

2 participants