KoljaWindeler / ytube_music_player

YouTube music player for homeassistant
345 stars 53 forks source link

cant play the list #323

Closed Catrushh closed 6 months ago

Catrushh commented 7 months ago

error log is

Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/ytmusicapi/helpers.py", line 64, in to_int int_value = locale.atoi(number_string) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/locale.py", line 327, in atoi return int(delocalize(string)) ^^^^^^^^^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: '' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/config/custom_components/ytube_music_player/media_player.py", line 1607, in async_play_media playlist_info = await self.hass.async_add_executor_job(lambda: self._api.get_playlist(media_id, limit=self._trackLimit)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/ytube_music_player/media_player.py", line 1607, in playlist_info = await self.hass.async_add_executor_job(lambda: self._api.get_playlist(media_id, limit=self._trackLimit)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/ytmusicapi/mixins/playlists.py", line 111, in get_playlist playlist.update(parse_playlist_header(response)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/ytmusicapi/parsers/playlists.py", line 43, in parse_playlist_header song_count = to_int(song_count[0]) if len(song_count) > 1 else 0 ^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/ytmusicapi/helpers.py", line 67, in to_int int_value = int(number_string) ^^^^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''

playlist was not work

need your help, thanks

KoljaWindeler commented 7 months ago

can you add a little more info like what did you do?