Closed saiftheboss7 closed 2 years ago
@couldbejake It'd be great if you could take a look at it. I'd be happy to provide any more details that might help you :D
Andm in some countries the number separator is the "." character and not the ",", giving the same error but for different reasons. In my case I just had to change the 164 line number separator to a dot.
@TheLeank I tried your fix but unfortunately I still get the same error. Because my views count is a string with a Bangla word "টি" with it
@TheLeank I tried your fix but unfortunately I still get the same error. Because my views count is a string with a Bangla word "টি" with it
Yeah, is not the very same bug. But you still can hardcode the view count and avoid the error. Just replace the line 164 of the file to:
song_viewcount = 9999
By default, the script won't download a song with less than 5000 YouTube views, since this app doesn't really download the song from Spotify: it retrieves the song names from a Spotify playlist, then searches and download them from YouTube.
With that patch, you'll be able to download every song in your playlist.
The script has been patched for different locales, if this fix does not work or you find another bug, feel free to report it via the issues tab.
Have a nice day :)
I was trying to use the script to download a playlist and have configured everything.
I think the view count is being generated in UTF-8 unicode format (in this case: Bengali) from the localized version of Spotify website. The script is not being able to handle it.
Here's the error
Traceback (most recent call last): File "/Users/saif/Downloads/spotify2mp3/run.py", line 268, in <module> main() File "/Users/saif/Downloads/spotify2mp3/run.py", line 262, in main download_playlist(spotify_url_link, playlist_name) File "/Users/saif/Downloads/spotify2mp3/run.py", line 164, in download_playlist song_viewcount = int(yt_data['views'].split(' ')[0].replace(',', '')) ValueError: invalid literal for int() with base 10: '16992104টি'