-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
YouTube Music Playlist Sync Error #1560
Comments
Hi. I have the same error in logs and empty playlist page when YTMusic. Log output
|
Could you make the playlist public and share it with me? Then I can try to figure out what is wrong . |
I checked playlists from explore -> playlist and music I liked automatic list shows a blank page (other playlists works well). Problem is this playlist can't be shared nor make it public. ¿May be the problem playlist is too big? Will check logs when in home. Edit: Don't know if related but when trying to open music I liked list from explore->YouTube music->playlists I get this on log:
Sorry for the bad formating. I paste it from my phone :/. Edit:I found a playlist that refuses to load on music-assistant: https://music.youtube.com/playlist?list=PLjGbaftmKtfZjtf4pWWuB66l1I2EQs03d&si=eYJ8ClExADGmlInY EditI found another stragne thing in my music library. There is a Frank Sinatra "channel" in my playlist that won't load in playlists. |
Hi again. I was trying gathering more data to isolate playlist issues. I adde some try/except ang logging to the code and found the exact items thar are making playlist sync fail.
I get this by make a small edit in music_provider.py:186
After this playlist sync works. Hope this hekps you to find a solution. |
Thanks for this, really helpful! Will debug this once I find some time |
I got this recently too.. not sure if this PR may help? will give it a go and test my workaround is to play something else (radio) and reload the playlist |
@MarvinSchenkel does get all fixes from the original library so this will be fixed when we next push out an update... |
Please check if this has been fixed in beta74 |
beta74 seems to have fixed that.. thanks :) |
This error still persist, sorry I did not contribute I was sick and just laying in bed. I'm running the beta74. Maybe will look into it myself as I'm having alot of playlists and not sure which one is causing it.
|
Have a look and see if you have any music videos in there. If they are on YTM then they should work but just in case have a look for that |
Im not sure what you mean, I'm using a mix of "official" songs provided by artists as well as user uploads for remixes and co. |
With the current code base the sync task for playlists fails when there is an error in one of the playlists. Would it be possible (and better) to check each playlists for errors instead, so at least playlists without any issues get shown. I mean it wouldn't directly fix the issue but may prevent some errors if Google decides to magically change some things in the future again and ytmusicapi might get new errors which aren't fixed (yet) |
Well I'm getting the same errors as schblondie now... |
@MarvinSchenkel any ideas? |
Another log, maybe this helps. Some error about "musicbrainz ID" is thrown.
|
No this is fixed in Beta 78! Thank you! |
What version of Music Assistant has the issue?
2023.6.0b3
The problem
YouTube Music Playlists don't get loaded as there's an error thrown.
How to reproduce
Hard to say, probably having a song without a required meta data. Could give access to all of my playlist via sharing of needed.
Relevant log output
2023-10-13 17:35:00.233 WARNING (MainThread) [music_assistant.music] Sync task for Felix completed with errors
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/music_assistant/server/providers/ytmusic/helpers.py", line 33, in _get_artist
artist = ytm.get_artist(channelId=prov_artist_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/ytmusicapi/mixins/browsing.py", line 239, in get_artist
artist.update(self.parser.parse_artist_contents(results))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/ytmusicapi/parsers/_utils.py", line 78, in _impl
return method(self, *method_args, **method_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/ytmusicapi/parsers/i18n.py", line 42, in parse_artist_contents
artist[category]['results'] = parse_content_list(data[0]['contents'],
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/ytmusicapi/parsers/browsing.py", line 47, in parse_content_list
contents.append(parse_func(result[key]))
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/ytmusicapi/parsers/browsing.py", line 108, in parse_video
'videoId': nav(result, NAVIGATION_VIDEO_ID),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/ytmusicapi/navigation.py", line 81, in nav
raise err
File "/usr/local/lib/python3.11/site-packages/ytmusicapi/navigation.py", line 75, in nav
root = root[k]
~~~~^^^
KeyError: 'watchEndpoint'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/music_assistant/server/controllers/music.py", line 576, in run_sync
await provider.sync_library(media_types)
File "/usr/local/lib/python3.11/site-packages/music_assistant/server/models/music_provider.py", line 386, in sync_library
library_item = await controller.add_item_to_library(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/music_assistant/server/controllers/media/tracks.py", line 148, in add_item_to_library
library_item = await self._add_library_item(item)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/music_assistant/server/controllers/media/tracks.py", line 376, in _add_library_item
track_artists = await self._get_artist_mappings(item)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/music_assistant/server/controllers/media/base.py", line 666, in _get_artist_mappings
artist_mapping = await self._get_artist_mapping(artist)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/music_assistant/server/controllers/media/base.py", line 684, in _get_artist_mapping
artist = await self.mass.music.artists.get_provider_item(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/music_assistant/server/controllers/media/base.py", line 414, in get_provider_item
if item := await provider.get_item(self.media_type, item_id):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/music_assistant/server/models/music_provider.py", line 260, in get_item
return await self.get_artist(prov_item_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/music_assistant/server/providers/ytmusic/init.py", line 307, in get_artist
if artist_obj := await get_artist(prov_artist_id=prov_artist_id, headers=self._headers):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/music_assistant/server/providers/ytmusic/helpers.py", line 41, in get_artist
return await asyncio.to_thread(_get_artist)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/threads.py", line 25, in to_thread
return await loop.run_in_executor(None, func_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/music_assistant/server/providers/ytmusic/helpers.py", line 37, in _get_artist
user = ytm.get_user(channelId=prov_artist_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/ytmusicapi/mixins/browsing.py", line 311, in get_user
user = {'name': nav(response, ['header', 'musicVisualHeaderRenderer'] + TITLE_TEXT)}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/ytmusicapi/navigation.py", line 81, in nav
raise err
File "/usr/local/lib/python3.11/site-packages/ytmusicapi/navigation.py", line 75, in nav
root = root[k]
~~~~^^^
KeyError: 'musicVisualHeaderRenderer'
Additional information
No response
What version of Home Assistant Core are your running
2023.10.2
What type of installation are you running?
Home Assistant Supervised
On what type of hardware are you running?
Linux
The text was updated successfully, but these errors were encountered: