mirror of
https://github.com/sigma67/ytmusicapi.git
synced 2026-04-25 15:26:01 +03:00
[GH-ISSUE #184] unfortunately we hit an error in the sub api, please open a ticket #140
Labels
No labels
a/b
bug
documentation
enhancement
good first issue
help wanted
invalid
pull-request
question
wontfix
yt-error
yt-update
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ytmusicapi#140
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ben0551 on GitHub (Mar 30, 2021).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/184
Traceback (most recent call last): File "/config/custom_components/ytube_music_player/media_player.py", line 807, in _update_playlists extra_info = self._api.get_playlist(playlistId=playlist['playlistId']) File "/usr/local/lib/python3.8/site-packages/ytmusicapi/mixins/playlists.py", line 102, in get_playlist playlist['tracks'].extend(parse_playlist_items(results['contents'])) KeyError: 'contents'
@sigma67 commented on GitHub (Mar 30, 2021):
Please specify which playlist you were accessing. @KoljaWindeler
@KoljaWindeler commented on GitHub (Apr 7, 2021):
Just to provide some extra feedback: beginning with version 20210402 my code will printout the exact function call to your api to help debugging.
Not sure if I mentioned that often enough: thanks for all you do!!
I personally listen to music for at least 4h each day ...
@sigma67 commented on GitHub (Apr 7, 2021):
Well thanks for using the API! Seeing it used in so many projects keeps me motivated :)
@ben0551 commented on GitHub (Apr 12, 2021):
Sorry for the delay! I get the error all through the day even if no playlist is playing. I have these 3 loaded in the card.
@ben0551 commented on GitHub (Apr 12, 2021):
Current error log:
Traceback (most recent call last): File "/config/custom_components/ytube_music_player/media_player.py", line 813, in async_update_playlists extra_info = await self.hass.async_add_executor_job(self._api.get_playlist,playlist['playlistId']) File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/usr/local/lib/python3.8/site-packages/ytmusicapi/mixins/playlists.py", line 102, in get_playlist playlist['tracks'].extend(parse_playlist_items(results['contents'])) KeyError: 'contents'
@sigma67 commented on GitHub (Apr 12, 2021):
These playlists can't be the root of the issue, they all work fine. @KoljaWindeler does your code print out the function parameters too?
@KoljaWindeler commented on GitHub (Apr 12, 2021):
yes it does ... @ben0551 please enable the debug informations (https://github.com/KoljaWindeler/ytube_music_player#debug-information) and paste the log here
@ben0551 commented on GitHub (Apr 12, 2021):
2021-04-13 07:23:07 DEBUG (MainThread) [custom_components.ytube_music_player.media_player] async_check_api
2021-04-13 07:23:07 DEBUG (MainThread) [custom_components.ytube_music_player.media_player] - no valid API, try to login
2021-04-13 07:23:07 DEBUG (MainThread) [custom_components.ytube_music_player.const] - login without brand ID
2021-04-13 07:23:07 DEBUG (MainThread) [custom_components.ytube_music_player.media_player] async_check_api
2021-04-13 07:23:07 DEBUG (MainThread) [custom_components.ytube_music_player.media_player] - no valid API, try to login
2021-04-13 07:23:07 DEBUG (MainThread) [custom_components.ytube_music_player.const] - login without brand ID
2021-04-13 07:23:08 DEBUG (MainThread) [custom_components.ytube_music_player.media_player] - YouTube Api initialized ok, version: 0.15.0
2021-04-13 07:23:08 DEBUG (MainThread) [custom_components.ytube_music_player.media_player] async_update_selects
2021-04-13 07:23:08 DEBUG (MainThread) [custom_components.ytube_music_player.media_player] - Adding 4 player to the dropdown
2021-04-13 07:23:08 DEBUG (MainThread) [custom_components.ytube_music_player.media_player] _update_playlists
2021-04-13 07:23:08 DEBUG (MainThread) [custom_components.ytube_music_player.media_player] - YouTube Api initialized ok, version: 0.15.0
2021-04-13 07:23:08 DEBUG (MainThread) [custom_components.ytube_music_player.media_player] async_update_selects
2021-04-13 07:23:08 DEBUG (MainThread) [custom_components.ytube_music_player.media_player] - Adding 6 player to the dropdown
2021-04-13 07:23:08 DEBUG (MainThread) [custom_components.ytube_music_player.media_player] _update_playlists
2021-04-13 07:23:09 DEBUG (MainThread) [custom_components.ytube_music_player.media_player] - 1 Playlists loaded
2021-04-13 07:23:09 DEBUG (MainThread) [custom_components.ytube_music_player.media_player] - 1 Playlists loaded
2021-04-13 07:23:10 DEBUG (MainThread) [custom_components.ytube_music_player.media_player] - Failed to get_playlist count for playlist ID 'LM' setting it to 25
2021-04-13 07:23:10 ERROR (MainThread) [custom_components.ytube_music_player.media_player]
============= ytube_music_player Integration Error ================
2021-04-13 07:23:10 ERROR (MainThread) [custom_components.ytube_music_player.media_player] unfortunately we hit an error in the sub api, please open a ticket at
2021-04-13 07:23:10 ERROR (MainThread) [custom_components.ytube_music_player.media_player] https://github.com/sigma67/ytmusicapi/issues
2021-04-13 07:23:10 ERROR (MainThread) [custom_components.ytube_music_player.media_player] and paste the following output:
2021-04-13 07:23:10 ERROR (MainThread) [custom_components.ytube_music_player.media_player] Traceback (most recent call last):
File "/config/custom_components/ytube_music_player/media_player.py", line 813, in async_update_playlists
extra_info = await self.hass.async_add_executor_job(self._api.get_playlist,playlist['playlistId'])
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.8/site-packages/ytmusicapi/mixins/playlists.py", line 102, in get_playlist
playlist['tracks'].extend(parse_playlist_items(results['contents']))
KeyError: 'contents'
2021-04-13 07:23:10 ERROR (MainThread) [custom_components.ytube_music_player.media_player]
thanks, Kolja
2021-04-13 07:23:10 ERROR (MainThread) [custom_components.ytube_music_player.media_player] ============= ytube_music_player Integration Error ================
2021-04-13 07:23:10 DEBUG (MainThread) [custom_components.ytube_music_player.media_player] async_update_playmode
2021-04-13 07:23:10 DEBUG (MainThread) [custom_components.ytube_music_player.media_player] - Selection field input_select.ytube_music_player_playmode not found, skipping
2021-04-13 07:23:10 DEBUG (MainThread) [custom_components.ytube_music_player.media_player] - Failed to get_playlist count for playlist ID 'LM' setting it to 25
2021-04-13 07:23:10 ERROR (MainThread) [custom_components.ytube_music_player.media_player]
============= ytube_music_player Integration Error ================
2021-04-13 07:23:10 ERROR (MainThread) [custom_components.ytube_music_player.media_player] unfortunately we hit an error in the sub api, please open a ticket at
2021-04-13 07:23:10 ERROR (MainThread) [custom_components.ytube_music_player.media_player] https://github.com/sigma67/ytmusicapi/issues
2021-04-13 07:23:10 ERROR (MainThread) [custom_components.ytube_music_player.media_player] and paste the following output:
2021-04-13 07:23:10 ERROR (MainThread) [custom_components.ytube_music_player.media_player] Traceback (most recent call last):
File "/config/custom_components/ytube_music_player/media_player.py", line 813, in async_update_playlists
extra_info = await self.hass.async_add_executor_job(self._api.get_playlist,playlist['playlistId'])
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.8/site-packages/ytmusicapi/mixins/playlists.py", line 102, in get_playlist
playlist['tracks'].extend(parse_playlist_items(results['contents']))
KeyError: 'contents'
2021-04-13 07:23:10 ERROR (MainThread) [custom_components.ytube_music_player.media_player]
thanks, Kolja
2021-04-13 07:23:10 ERROR (MainThread) [custom_components.ytube_music_player.media_player] ============= ytube_music_player Integration Error ================