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

Skips many songs. #75

Open
rickdtc opened this issue Jul 5, 2023 · 7 comments
Open

Skips many songs. #75

rickdtc opened this issue Jul 5, 2023 · 7 comments

Comments

@rickdtc
Copy link

rickdtc commented Jul 5, 2023

First before playing anything I saw thus error, realised something is wrong cuz its a pytube error.

Traceback (most recent call last):
  File "/usr/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
    self.run()
  File "/home/anamitra/.local/lib/python3.11/site-packages/mopidy_ytmusic/repeating_timer.py", line 18, in run
    self._method()
  File "/home/anamitra/.local/lib/python3.11/site-packages/mopidy_ytmusic/backend.py", line 99, in _refresh_youtube_player
    self.playback.update_cipher(playerurl=url)
  File "/home/anamitra/.local/lib/python3.11/site-packages/mopidy_ytmusic/playback.py", line 25, in update_cipher
    self.PyTubeCipher = Cipher(js=response.text)
                        ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/anamitra/.local/lib/python3.11/site-packages/pytube/cipher.py", line 43, in __init__
    self.throttling_plan = get_throttling_plan(js)
                           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/anamitra/.local/lib/python3.11/site-packages/pytube/cipher.py", line 405, in get_throttling_plan
    raw_code = get_throttling_function_code(js)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/anamitra/.local/lib/python3.11/site-packages/pytube/cipher.py", line 311, in get_throttling_function_code
    name = re.escape(get_throttling_function_name(js))
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/anamitra/.local/lib/python3.11/site-packages/pytube/cipher.py", line 296, in get_throttling_function_name
    raise RegexMatchError(
pytube.exceptions.RegexMatchError: get_throttling_function_name: could not find match for multiple

then, when I try to play a song, it skips many songs.

  translate_uri error "'NoneType' object has no attribute 'get_signature'"
WARNING  2023-07-05 23:50:02,024 [12921:Core-10 (_actor_loop)] mopidy.core.tracklist
  Track is not playable: ytmusic:track:tKaTJhgBFMM
ERROR    2023-07-05 23:50:02,464 [12921:YTMusicBackend-7 (_actor_loop)] mopidy_ytmusic
  translate_uri error "'NoneType' object has no attribute 'get_signature'"
WARNING  2023-07-05 23:50:02,465 [12921:Core-10 (_actor_loop)] mopidy.core.tracklist
  Track is not playable: ytmusic:track:u9hHetyLtbQ
ERROR    2023-07-05 23:50:02,736 [12921:YTMusicBackend-7 (_actor_loop)] mopidy_ytmusic
  translate_uri error "'NoneType' object has no attribute 'get_signature'"
WARNING  2023-07-05 23:50:02,737 [12921:Core-10 (_actor_loop)] mopidy.core.tracklist
  Track is not playable: ytmusic:track:u1LBHKQjhLU
ERROR    2023-07-05 23:50:03,014 [12921:YTMusicBackend-7 (_actor_loop)] mopidy_ytmusic
  translate_uri error "'NoneType' object has no attribute 'get_signature'"
WARNING  2023-07-05 23:50:03,015 [12921:Core-10 (_actor_loop)] mopidy.core.tracklist
  Track is not playable: ytmusic:track:-00bkI1871M
@bendschs
Copy link

bendschs commented Jul 10, 2023

same here, songs are just being skipped instead of being played.

2023-07-10 12:05:40,721 ERROR [8607:YTMusicBackend-14] mopidy_ytmusic: translate_uri error "'NoneType' object has no attribute 'get_signature'"
2023-07-10 12:05:40,722 WARNING [8607:Core-18] mopidy.core.tracklist: Track is not playable: ytmusic:track:GlAYS1LV5hI
2023-07-10 12:05:41,074 ERROR [8607:YTMusicBackend-14] mopidy_ytmusic: translate_uri error "'NoneType' object has no attribute 'get_signature'"
2023-07-10 12:05:41,076 WARNING [8607:Core-18] mopidy.core.tracklist: Track is not playable: ytmusic:track:h4bP9tj_0Zk
2023-07-10 12:05:41,458 ERROR [8607:YTMusicBackend-14] mopidy_ytmusic: translate_uri error "'NoneType' object has no attribute 'get_signature'"
2023-07-10 12:05:41,460 WARNING [8607:Core-18] mopidy.core.tracklist: Track is not playable: ytmusic:track:qJlV0LWwWWg
2023-07-10 12:05:41,860 ERROR [8607:YTMusicBackend-14] mopidy_ytmusic: translate_uri error "'NoneType' object has no attribute 'get_signature'"
2023-07-10 12:05:41,861 WARNING [8607:Core-18] mopidy.core.tracklist: Track is not playable: ytmusic:track:zg8_oPuAOtE
2023-07-10 12:05:42,145 ERROR [8607:YTMusicBackend-14] mopidy_ytmusic: translate_uri error "'NoneType' object has no attribute 'get_signature'"
2023-07-10 12:05:42,148 WARNING [8607:Core-18] mopidy.core.tracklist: Track is not playable: ytmusic:track:xAf8dSyK2HM
2023-07-10 12:06:52,188 ERROR [8607:YTMusicBackend-14] mopidy_ytmusic: translate_uri error "'NoneType' object has no attribute 'get_signature'"
2023-07-10 12:06:52,192 WARNING [8607:Core-18] mopidy.core.tracklist: Track is not playable: ytmusic:track:ISgE0ALH4gQ
2023-07-10 12:06:52,490 ERROR [8607:YTMusicBackend-14] mopidy_ytmusic: translate_uri error "'NoneType' object has no attribute 'get_signature'"
2023-07-10 12:06:52,492 WARNING [8607:Core-18] mopidy.core.tracklist: Track is not playable: ytmusic:track:3ewsdfeM-nQ
2023-07-10 12:06:52,882 ERROR [8607:YTMusicBackend-14] mopidy_ytmusic: translate_uri error "'NoneType' object has no attribute 'get_signature'"
2023-07-10 12:06:52,884 WARNING [8607:Core-18] mopidy.core.tracklist: Track is not playable: ytmusic:track:j5Y3u2D8kxg
2023-07-10 12:06:53,216 ERROR [8607:YTMusicBackend-14] mopidy_ytmusic: translate_uri error "'NoneType' object has no attribute 'get_signature'"
2023-07-10 12:06:53,218 WARNING [8607:Core-18] mopidy.core.tracklist: Track is not playable: ytmusic:track:Eu6PbEQ6Zyg

@rickdtc
Copy link
Author

rickdtc commented Jul 10, 2023

Sorry, I forgot to update the status of the problem, my bad 😅 but this from #71 can be a temporary fix.

Don't know if this breaks anything else yet, it shouldn't.

@rickdtc
Copy link
Author

rickdtc commented Jul 16, 2023

@bendschs if you are still here can you check if mopidy is throwing errors when trying to search ytmusic through webclients like iris or musicbox?

@eugenweissbart
Copy link

Sorry, I forgot to update the status of the problem, my bad 😅 but this from #71 can be a temporary fix.

Don't know if this breaks anything else yet, it shouldn't.

this doesn't fix, it suppresses exception. tracks still skipped

@rickdtc
Copy link
Author

rickdtc commented Jul 28, 2023

Sorry, I forgot to update the status of the problem, my bad 😅 but this from #71 can be a temporary fix.
Don't know if this breaks anything else yet, it shouldn't.

this doesn't fix, it suppresses exception. tracks still skipped

This fixed for me before now there seems to be a new exception

@bendschs
Copy link

Sorry, I forgot to update the status of the problem, my bad 😅 but this from #71 can be a temporary fix.
Don't know if this breaks anything else yet, it shouldn't.

this doesn't fix, it suppresses exception. tracks still skipped

This fixed for me before now there seems to be a new exception

#71 fixed it for me as well, i had to follow this link to get cypher.py though: https://github.com/yogeshgirmal/pytube/blob/master/pytube/cipher.py

for me it is still working.
hope to have helped

bendsch

@eugenweissbart
Copy link

Well, it magically started working again. After replacing cipher.py, that is.

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

3 participants