Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Won't run due to UnboundLocalError #240

Closed
LytixDev opened this issue Jan 26, 2022 · 2 comments · Fixed by #244
Closed

Won't run due to UnboundLocalError #240

LytixDev opened this issue Jan 26, 2022 · 2 comments · Fixed by #244
Labels

Comments

@LytixDev
Copy link

LytixDev commented Jan 26, 2022

Won't run due to UnboundLocalError

(spotify_dl -V -l https://open.spotify.com/playlist/<removed-for-privacy> ok-dl
[21:02:26] Starting spotify_dl v8.0.0                                                 spotify_dl.py:65
Setting debug mode on spotify_dl                                                      spotify_dl.py:66
Checking for tokens                                                                     scaffold.py:24
Tokens fetched: scaffold.py:27
Arguments: Namespace(url=['https://open.spotify.com/playlist/<removed-for-privacy>', spotify_dl.py:72
'ok-dl'], output=None, download=True, format_str='bestaudio/best',
keep_playlist_order=False, skip_mp3=False, no_overwrites=False, verbose=True,
version=False)
Got item type playlist and item_id 30nJoMyg9tI39uktW4Yi80                               spotify.py:163
Traceback (most recent call last):
  File "/home/nic/.local/bin/spotify_dl", line 8, in <module>
    sys.exit(spotify_dl())
  File "/home/nic/.local/lib/python3.10/site-packages/spotify_dl/spotify_dl.py", line 88, in spotify_dl
    songs = fetch_tracks(sp, item_type, url)
UnboundLocalError: local variable 'item_type' referenced before assignment
Sentry is attempting to send 2 pending error messages
Waiting up to 2 seconds
Press Ctrl-C to quit
)

This is on Linux
Python version = 3.10.2

@LytixDev LytixDev added the bug label Jan 26, 2022
@SathyaBhat
Copy link
Owner

SathyaBhat commented Jan 26, 2022

You shoould be passing -o to specify where to download

spotify_dl -V -l https://open.spotify.com/playlist/<removed-for-privacy> -o .

will download to the current directory. That said, it shouldn't be throwing this error, I will fix this in the next release

@spicysardine
Copy link

this program does not work. Thank you for the try though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants