zotify-dev / zotify

A fast and customizable music and podcast downloader.
zlib License
1.08k stars 83 forks source link

KeyError: 'items' #70

Open TownyDrop opened 8 months ago

TownyDrop commented 8 months ago

I run into Errors when trying to download a playlist and they look as following:

Downloading Playlist Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "c:\users\U.local\bin\zotify.exe__main.py", line 7, in File "C:\Users\U.local\pipx\venvs\zotify\Lib\site-packages\zotify\main__.py", line 64, in main args.func(args) File "C:\Users\U.local\pipx\venvs\zotify\Lib\site-packages\zotify\app.py", line 52, in client download_from_user_playlist() File "C:\Users\U.local\pipx\venvs\zotify\Lib\site-packages\zotify\playlist.py", line 81, in download_from_user_playlist download_playlist(playlist) File "C:\Users\U.local\pipx\venvs\zotify\Lib\site-packages\zotify\playlist.py", line 52, in download_playlist playlist_songs = [song for song in get_playlist_songs(playlist[ID]) if song[TRACK][ID]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\U.local\pipx\venvs\zotify\Lib\site-packages\zotify\playlist.py", line 36, in get_playlist_songs songs.extend(resp[ITEMS])


KeyError: 'items'

my config looks as following: { "SAVE_CREDENTIALS": "True", "CREDENTIALS_LOCATION": "", "OUTPUT": "", "SONG_ARCHIVE": "True", "ROOT_PATH": "", "ROOT_PODCAST_PATH": "", "SPLIT_ALBUM_DISCS": "False", "DOWNLOAD_LYRICS": "False", "MD_SAVE_GENRES": "True", "MD_ALLGENRES": "True", "MD_GENREDELIMITER": " ; ", "DOWNLOAD_FORMAT": "mp3", "DOWNLOAD_QUALITY": "very_high", "TRANSCODE_BITRATE": "320kbps", "SKIP_EXISTING": "True", "SKIP_PREVIOUSLY_DOWNLOADED": "True", "RETRY_ATTEMPTS": "3", "BULK_WAIT_TIME": "1", "OVERRIDE_AUTO_WAIT": "False", "CHUNK_SIZE": "20000", "DOWNLOAD_REAL_TIME": "False", "LANGUAGE": "en", "PRINT_SPLASH": "False", "PRINT_SKIPS": "True", "PRINT_DOWNLOAD_PROGRESS": "True", "PRINT_ERRORS": "True", "PRINT_DOWNLOADS": "True", "PRINT_API_ERRORS": "True", "PRINT_PROGRESS_INFO": "True", "PRINT_WARNINGS": "True", "TEMP_DOWNLOAD_DIR": "" }

Hope someone can help me, kind regards, Towny

zuzanna-maria commented 6 months ago

@TownyDrop I have run into this issue when trying to download a private playlist. Check if the playlist you're trying to dl is private, if so change it to public, and try again.