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

See playlists but cannot play #46

Open
bfrggit opened this issue Jan 23, 2022 · 4 comments
Open

See playlists but cannot play #46

bfrggit opened this issue Jan 23, 2022 · 4 comments

Comments

@bfrggit
Copy link

bfrggit commented Jan 23, 2022

As instructed in the setup step, I pasted in the request headers of a POST request. Now I can see the YouTube playlists and auto playlists, however whenever I try to play a song, progress bar (Iris) shows 3~4 sec of progress and then stop. MPD client clicking on play button has no effect at all.

@jsalatiel
Copy link

Same here. Cant play anything
ERROR 2022-02-13 17:18:31,568 [77098:YTMusicBackend-3] mopidy_ytmusic
translate_uri error "'NoneType' object has no attribute 'get_signature'"
WARNING 2022-02-13 17:18:31,569 [77098:Core-9] mopidy.core.tracklist
Track is not playable: ytmusic:track:-Fe0vU205H4

@gus
Copy link

gus commented Feb 18, 2022

Fixed this locally by updating pytube and ytmusicapi to the latest versions (12.0.0 and 0.20.0 respectively). Songs are definitely playing and I'm no longer seeing the get_signature error. When I get a chance I'll put a PR together.

@shameerariff
Copy link

My installed versions are
mopidy-ytmusic = 3.1.1
ytmusicapi = 2.25.1
pytube = 12.0.0

I am getting the following errors

Apr 15 21:35:42 MusicBox mopidy[18739]: Exception in thread Thread-6:
Apr 15 21:35:42 MusicBox mopidy[18739]: Traceback (most recent call last):
Apr 15 21:35:42 MusicBox mopidy[18739]: File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
Apr 15 21:35:42 MusicBox mopidy[18739]: self.run()
Apr 15 21:35:42 MusicBox mopidy[18739]: File "/usr/local/lib/python3.9/dist-packages/mopidy_ytmusic/repeating_timer.py", line 18, in run
Apr 15 21:35:42 MusicBox mopidy[18739]: self._method()
Apr 15 21:35:42 MusicBox mopidy[18739]: File "/usr/local/lib/python3.9/dist-packages/mopidy_ytmusic/backend.py", line 99, in _refresh_youtube_player
Apr 15 21:35:42 MusicBox mopidy[18739]: self.playback.update_cipher(playerurl=url)
Apr 15 21:35:42 MusicBox mopidy[18739]: File "/usr/local/lib/python3.9/dist-packages/mopidy_ytmusic/playback.py", line 25, in update_cipher
Apr 15 21:35:42 MusicBox mopidy[18739]: self.PyTubeCipher = Cipher(js=response.text)
Apr 15 21:35:42 MusicBox mopidy[18739]: File "/usr/local/lib/python3.9/dist-packages/pytube/cipher.py", line 43, in init
Apr 15 21:35:42 MusicBox mopidy[18739]: self.throttling_plan = get_throttling_plan(js)
Apr 15 21:35:42 MusicBox mopidy[18739]: File "/usr/local/lib/python3.9/dist-packages/pytube/cipher.py", line 405, in get_throttling_plan
Apr 15 21:35:42 MusicBox mopidy[18739]: raw_code = get_throttling_function_code(js)
Apr 15 21:35:42 MusicBox mopidy[18739]: File "/usr/local/lib/python3.9/dist-packages/pytube/cipher.py", line 311, in get_throttling_function_code
Apr 15 21:35:42 MusicBox mopidy[18739]: name = re.escape(get_throttling_function_name(js))
Apr 15 21:35:42 MusicBox mopidy[18739]: File "/usr/local/lib/python3.9/dist-packages/pytube/cipher.py", line 296, in get_throttling_function_name
Apr 15 21:35:42 MusicBox mopidy[18739]: raise RegexMatchError(
Apr 15 21:35:42 MusicBox mopidy[18739]: pytube.exceptions.RegexMatchError: get_throttling_function_name: could not find match for multiple
Apr 15 21:36:11 MusicBox mopidy[18739]: INFO [MpdSession-28] mopidy_mpd.session New MPD connection from [::ffff:127.0.0.1]:52586
Apr 15 21:36:25 MusicBox mopidy[18739]: ERROR [YTMusicBackend-4] mopidy_ytmusic translate_uri error "'NoneType' object has no attribute 'get_signature'"
Apr 15 21:36:25 MusicBox mopidy[18739]: WARNING [Core-18] mopidy.core.tracklist Track is not playable: ytmusic:track:RcQiR7Dkfao

@kmac
Copy link
Contributor

kmac commented Apr 30, 2022

Looks like this is caused by a bug in pytube. Link to the comment with workaround: pytube/pytube#1293 (comment). There is a manual workaround to replace the regex - it works for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants