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

Cannot search YTmusic if I configured an auth_json file #79

Open
jcoteBrio opened this issue Dec 13, 2023 · 0 comments
Open

Cannot search YTmusic if I configured an auth_json file #79

jcoteBrio opened this issue Dec 13, 2023 · 0 comments

Comments

@jcoteBrio
Copy link

jcoteBrio commented Dec 13, 2023

when searching without a premium account the search work but I get this in log:

ERROR 2023-12-13 18:01:59,898 [4093:YTMusicBackend-3 (_actor_loop)] mopidy_ytmusic
YTMusic failed parsing artist Les Cowboys Fringants
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/mopidy_ytmusic/library.py", line 1102, in parseSearch
albums = self.backend.api.get_artist_albums(
File "/usr/local/lib/python3.10/dist-packages/ytmusicapi/mixins/browsing.py", line 255, in get_artist_albums
results = nav(response, SINGLE_COLUMN_TAB + SECTION_LIST_ITEM + GRID_ITEMS)
File "/usr/local/lib/python3.10/dist-packages/ytmusicapi/navigation.py", line 81, in nav
raise err
File "/usr/local/lib/python3.10/dist-packages/ytmusicapi/navigation.py", line 75, in nav
root = root[k]
KeyError: 'gridRenderer'
INFO 2023-12-13 18:02:15,775 [4093:YTMusicBackend-3 (_actor_loop)] mopidy_ytmusic
YTMusic Found AUDIO_QUALITY_MEDIUM stream with 159524 bitrate for mBLKHXT567Y

When auth_json is configured and working fine for playlist, I cannot search anymore, I get this:

ERROR    2023-12-13 18:06:08,942 [4131:YTMusicBackend-3 (_actor_loop)] mopidy_ytmusic
  YTMusic search failed for query "any"="la manifestation"
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/mopidy_ytmusic/library.py", line 607, in search
    results = self.parseSearch(res)
  File "/usr/local/lib/python3.10/dist-packages/mopidy_ytmusic/library.py", line 1006, in parseSearch
    length = [int(i) for i in result["duration"].split(":")]
AttributeError: 'NoneType' object has no attribute 'split'
ERROR    2023-12-13 18:06:08,943 [4131:Core-9 (_actor_loop)] mopidy.core.library
  YTMusicBackend backend returned bad data: Expected a SearchResult instance, not []


ERROR    2023-12-13 18:08:42,578 [4131:YTMusicBackend-3 (_actor_loop)] mopidy_ytmusic
  YTMusic search failed for query "any"="Les Cowboys Fringants"
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/mopidy_ytmusic/library.py", line 1091, in parseSearch
    artistq = self.backend.api.get_artist(result["browseId"])
KeyError: 'browseId'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/mopidy_ytmusic/library.py", line 607, in search
    results = self.parseSearch(res)
  File "/usr/local/lib/python3.10/dist-packages/mopidy_ytmusic/library.py", line 1191, in parseSearch
    "YTMusic failed parsing artist %s", result["artist"]
KeyError: 'artist'
ERROR    2023-12-13 18:08:42,579 [4131:Core-9 (_actor_loop)] mopidy.core.library
  YTMusicBackend backend returned bad data: Expected a SearchResult instance, not []
ERROR    2023-12-13 18:08:42,579 [4131:Core-9 (_actor_loop)] mopidy.core.library
  FileBackend backend returned bad data: Expected a SearchResult instance, not []
ERROR    2023-12-13 18:08:42,579 [4131:Core-9 (_actor_loop)] mopidy.core.library
  StreamBackend backend returned bad data: Expected a SearchResult instance, not []

The only difference between the two logs, is a change in mopidy.conf to configure auth_json.

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

1 participant