SathyaBhat / spotify-dl

Downloads songs from your Spotify Playlist
http://sathyasays.com/2015/12/29/spotify-dl-download-your-spotify-my-music-songs-as-mp3/
MIT License
1.74k stars 214 forks source link

App appears to be invoking -l process despite use of -i flag #90

Closed alex4108 closed 3 years ago

alex4108 commented 4 years ago

Describe the bug An attempt to download a single song using the -i flag produces an error and stack trace instead of downloading the file

To Reproduce Please copy paste the entire command, running it in verbose more by passing the -V flag. example: spotify_dl -d -i spotify:track:1WfMi7xvOti8F4dSf7atd9 -o /mnt/d/Spotify_DL/ and spotify_dl -i https://open.spotify.com/track/1WfMi7xvOti8F4dSf7atd9?si=A6DsSTOyS46WNZjfYFmJ9w -o /mnt/d/Spotify_DL/ -d

Expected behavior Download the song

Screenshots

alex@DESKTOP-6H0TC0U:~$ spotify_dl -i https://open.spotify.com/track/1WfMi7xvOti8F4dSf7atd9?si=A6DsSTOyS46WNZjfYFmJ9w -o /mnt/d/Spotify_DL/ -d
INFO: 2020-07-27 23:15:05,629 - spotify_dl - Starting spotify_dl
INFO: 2020-07-27 23:15:05,724 - extract_user_and_playlist_from_uri - List owner: 1254326166
Traceback (most recent call last):
  File "/usr/local/bin/spotify_dl", line 11, in <module>
    sys.exit(spotify_dl())
  File "/usr/local/lib/python3.6/dist-packages/spotify_dl/spotify_dl.py", line 86, in spotify_dl
    current_user_id, playlist_id = extract_user_and_playlist_from_uri(args.uri[0], sp)
  File "/usr/local/lib/python3.6/dist-packages/spotify_dl/spotify.py", line 120, in extract_user_and_playlist_from_uri
    return user_id, playlist_id
UnboundLocalError: local variable 'playlist_id' referenced before assignment
Sentry is attempting to send 0 pending error messages
Waiting up to 2 seconds
Press Ctrl-C to quit
alex@DESKTOP-6H0TC0U:~$ spotify_dl -d -i spotify:track:1WfMi7xvOti8F4dSf7atd9 -o /mnt/d/Spotify_DL/
INFO: 2020-07-27 23:15:26,232 - spotify_dl - Starting spotify_dl
INFO: 2020-07-27 23:15:26,415 - extract_user_and_playlist_from_uri - List owner: 1254326166
Traceback (most recent call last):
  File "/usr/local/bin/spotify_dl", line 11, in <module>
    sys.exit(spotify_dl())
  File "/usr/local/lib/python3.6/dist-packages/spotify_dl/spotify_dl.py", line 86, in spotify_dl
    current_user_id, playlist_id = extract_user_and_playlist_from_uri(args.uri[0], sp)
  File "/usr/local/lib/python3.6/dist-packages/spotify_dl/spotify.py", line 120, in extract_user_and_playlist_from_uri
    return user_id, playlist_id
UnboundLocalError: local variable 'playlist_id' referenced before assignment
Sentry is attempting to send 0 pending error messages
Waiting up to 2 seconds
Press Ctrl-C to quit

Desktop (please complete the following information): Ubuntu 18.04 / Python 3.6.9

SathyaBhat commented 4 years ago

thanks for reporting

SathyaBhat commented 3 years ago

this has been fixed in latest version. Please upgrade your install using

pip install spotify_dl --upgrade