You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I receive the following errors when trying to run get_playlist with the Korean ("ko") language using v1.7.3:
Traceback (most recent call last):
File "C:\Users\asdf\AppData\Local\Programs\Python\Python311\Lib\site-packages\ytmusicapi\helpers.py", line 64, in to_int
int_value = locale.atoi(number_string)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\asdf\AppData\Local\Programs\Python\Python311\Lib\locale.py", line 342, in atoi
return int(delocalize(string))
^^^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: ''
and
File "C:\Users\asdf\Source\MelonYTMPlaylist\src\playlist_updater.py", line 117, in get_playlist
return self.ytmusic.get_playlist(self.playlistId, None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\asdf\AppData\Local\Programs\Python\Python311\Lib\site-packages\ytmusicapi\mixins\playlists.py", line 111, in get_playlist
return self._parse_new_playlist_format(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\asdf\AppData\Local\Programs\Python\Python311\Lib\site-packages\ytmusicapi\mixins\playlists.py", line 215, in _parse_new_playlist_format
song_count = to_int(song_count[0]) if len(song_count) > 1 else 0
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\asdf\AppData\Local\Programs\Python\Python311\Lib\site-packages\ytmusicapi\helpers.py", line 67, in to_int
int_value = int(number_string)
^^^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: ''
To Reproduce
Steps to reproduce the behavior:
Set YTMusic language parameter to Korean (language="ko")
These seem to be the offending lines. While English returns "100 tracks" for second_subtitle_runs[has_views + 0]["text"], in Korean, it returns "트랙 100개", Therefore, song_count[0] does not have the correct value in the Korean language. The integer should be extracted from the string to account for such differences.
The text was updated successfully, but these errors were encountered:
Describe the bug
I receive the following errors when trying to run
get_playlist
with the Korean ("ko
") language using v1.7.3:and
To Reproduce
Steps to reproduce the behavior:
YTMusic
language parameter to Korean (language="ko"
)ytmusic.get_playlist(playlistId)
Additional context
ytmusicapi/ytmusicapi/mixins/playlists.py
Lines 214 to 215 in 11823d6
These seem to be the offending lines. While English returns "100 tracks" for
second_subtitle_runs[has_views + 0]["text"]
, in Korean, it returns "트랙 100개", Therefore,song_count[0]
does not have the correct value in the Korean language. The integer should be extracted from the string to account for such differences.The text was updated successfully, but these errors were encountered: