mirror of
https://github.com/Googolplexed0/zotify.git
synced 2026-04-24 22:05:53 +03:00
[GH-ISSUE #44] [Bug Report] "Cannot get alternative track" and "librespot.core.ApiClient.StatusCodeException: 500" errors #38
Labels
No labels
bug
considering
discussion
documentation
enhancement
enhancement
good first issue
help wanted
pull-request
question
stale
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/zotify#38
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @NickDegrasse on GitHub (Aug 6, 2025).
Original GitHub issue: https://github.com/Googolplexed0/zotify/issues/44
Originally assigned to: @Googolplexed0 on GitHub.
Bug Description
Following logging in successfully, and running zotify, I have been receiving general download errors, with the errors listed as "Cannot get alternative track" and "librespot.core.ApiClient.StatusCodeException: 500." This occurs with both individual tracks, and playlists, and typically occurs after the download progress is at 10-50% completion.
Bug Triggering Command
zotify [song/playlist url]
Error Traceback / Logs
zotify https://open.spotify.com/track/2SsY5k7UWFqgye3PUMG3Oq?si=958d7d6b404c4e88 --debug
config_DEBUG.json saved to C:\Users[USER]\AppData\Roaming\Zotify
DEBUG
Duplicate Check
File Already Exists: False
song_id in Local Archive: False
song_id in Global Archive: False
ERROR: SKIPPING SONG - GENERAL DOWNLOAD ERROR
Track_Label: Chappell Roan - The Subway - Track_ID: 2SsY5k7UWFqgye3PUMG3Oq
########################################################################################################################
{}
########################################################################################################################
Traceback (most recent call last):
File "C:\Users[USER]\pipx\venvs\zotify\lib\site-packages\zotify\track.py", line 292, in download_track
stream = Zotify.get_content_stream(track, Zotify.DOWNLOAD_QUALITY)
File "C:\Users[USER]\pipx\venvs\zotify\lib\site-packages\zotify\zotify.py", line 57, in get_content_stream
return cls.SESSION.content_feeder().load(content_id, VorbisOnlyAudioQuality(quality), False, None)
File "C:\Users[USER]\pipx\venvs\zotify\lib\site-packages\librespot\audio_init_.py", line 741, in load
return self.load_track(playable_id, audio_quality_picker, preload,
File "C:\Users[USER]\pipx\venvs\zotify\lib\site-packages\librespot\audio_init_.py", line 789, in load_track
original = self.__session.api().get_metadata_4_track(
File "C:\Users[USER]\pipx\venvs\zotify\lib\site-packages\librespot\core.py", line 169, in get_metadata_4_track
ApiClient.StatusCodeException.check_status(response)
File "C:\Users[USER]\pipx\venvs\zotify\lib\site-packages\librespot\core.py", line 326, in check_status
raise ApiClient.StatusCodeException(response)
librespot.core.ApiClient.StatusCodeException: 500
DEBUG
Total API Calls: 1
Config File
{
"ROOT_PATH": "
/Music/Zotify Music",/Music/Zotify Podcasts","SAVE_CREDENTIALS": "True",
"CREDENTIALS_LOCATION": "",
"OUTPUT": "",
"OUTPUT_PLAYLIST": "{playlist}/{song_name}",
"OUTPUT_PLAYLIST_EXT": "{playlist}/{playlist_num}{artist}{song_name}",
"OUTPUT_LIKED_SONGS": "Liked Songs/{artist}{song_name}",
"OUTPUT_SINGLE": "{artist}/{album}/{artist}{song_name}",
"OUTPUT_ALBUM": "{artist}/{album}/{album_num}{artist}{song_name}",
"ROOT_PODCAST_PATH": "
"SPLIT_ALBUM_DISCS": "False",
"MAX_FILENAME_LENGTH": "0",
"BULK_WAIT_TIME": "30",
"DOWNLOAD_REAL_TIME": "False",
"TEMP_DOWNLOAD_DIR": "",
"DOWNLOAD_PARENT_ALBUM": "False",
"NO_COMPILATION_ALBUMS": "False",
"REGEX_ENABLED": "False",
"REGEX_TRACK_SKIP": "",
"REGEX_EPISODE_SKIP": "",
"REGEX_ALBUM_SKIP": "",
"DOWNLOAD_FORMAT": "ogg",
"DOWNLOAD_QUALITY": "very_high",
"TRANSCODE_BITRATE": "auto",
"SONG_ARCHIVE_LOCATION": "",
"DISABLE_SONG_ARCHIVE": "False",
"DISABLE_DIRECTORY_ARCHIVES": "False",
"SKIP_EXISTING": "True",
"SKIP_PREVIOUSLY_DOWNLOADED": "True",
"EXPORT_M3U8": "False",
"M3U8_LOCATION": "",
"M3U8_REL_PATHS": "True",
"LIKED_SONGS_ARCHIVE_M3U8": "True",
"DOWNLOAD_LYRICS": "True",
"LYRICS_LOCATION": "",
"ALWAYS_CHECK_LYRICS": "False",
"LYRICS_MD_HEADER": "False",
"LANGUAGE": "en",
"STRICT_LIBRARY_VERIFY": "True",
"MD_DISC_TRACK_TOTALS": "True",
"MD_SAVE_GENRES": "True",
"MD_ALLGENRES": "False",
"MD_GENREDELIMITER": ", ",
"MD_ARTISTDELIMITER": ", ",
"MD_SAVE_LYRICS": "True",
"ALBUM_ART_JPG_FILE": "False",
"RETRY_ATTEMPTS": "1",
"CHUNK_SIZE": "20000",
"OAUTH_ADDRESS": "0.0.0.0",
"REDIRECT_ADDRESS": "127.0.0.1",
"PRINT_SPLASH": "False",
"PRINT_PROGRESS_INFO": "True",
"PRINT_SKIPS": "True",
"PRINT_DOWNLOADS": "True",
"PRINT_DOWNLOAD_PROGRESS": "True",
"PRINT_URL_PROGRESS": "True",
"PRINT_ALBUM_PROGRESS": "True",
"PRINT_ARTIST_PROGRESS": "True",
"PRINT_PLAYLIST_PROGRESS": "True",
"PRINT_WARNINGS": "True",
"PRINT_ERRORS": "True",
"PRINT_API_ERRORS": "True",
"FFMPEG_LOG_LEVEL": "error"
}
Zotify Version
v0.9.0
Additional Context
I did just recently install this branch after having installed the original zotify-dev branch awhile back (which also has this same issue). I renamed the folder containing the old 'zotify.exe', and when running this branch of zotify, have been changing the directory to the containing folder for zotify (C:\Users[USER]\pipx\venvs\zotify\Scripts), then running the 'zotify' command. I'm unsure if there are leftover files from the old install that would cause issues? However when I use this approach I'm able to use commands (such as --version) not implemented in the old branch of zotify
@ariririos commented on GitHub (Aug 6, 2025):
I am having the same issue on Arch Linux starting today.
uname -a:Linux aris-server 6.15.8-arch1-2 #1 SMP PREEMPT_DYNAMIC Tue, 29 Jul 2025 15:05:00 +0000 x86_64 GNU/Linuxzotify --version:Zotify 0.9.0zotify stacktraces:
config-DEBUG.json:
@NickDegrasse commented on GitHub (Aug 6, 2025):
Apparently this issue may be with librespot itself: https://github.com/librespot-org/librespot/issues/1527, sounds like within the past few days something broke within librespot that has been causing issues with playing songs
@NickDegrasse commented on GitHub (Aug 6, 2025):
It sounds like there is a fix in a branch of librespot written in go (https://github.com/devgianlu/go-librespot/issues/189#issuecomment-3160813582), however this issue is still open in the python edition of librespot (https://github.com/kokarare1212/librespot-python/issues/308). I'm assuming once this has been solved on the librespot side, simply reinstalling zotify should pull the most recent version of librespot with this fix?
@TNAS123 commented on GitHub (Aug 6, 2025):
You can download this merge/updated file and replace your
core.pywith it. I confirmed it fixed it for me.github.com/kokarare1212/librespot-python@336fa9acc6/librespot/core.py@NickDegrasse commented on GitHub (Aug 6, 2025):
This appears to be working for me for now, thanks for the tip!
@nefariouslegion commented on GitHub (Aug 7, 2025):
I was having the same issue and this seems to have fixed it for me too. Thank you!
@Googolplexed0 commented on GitHub (Aug 7, 2025):
I had assumed it would be an issue with the libraries this project relies on, rather than anything here failing. There has probably been another round of API changes that are causing this bug, and several of the other bugs, with logging in and fetching data. Doing
pip install --force-reinstall git+https://github.com/kokarare1212/librespot-pythonwill probably fix it.@TheOriginalSpacerat commented on GitHub (Aug 7, 2025):
I answer myself: I fixed it. Possible interesting for some other people with the same problem:
First uninstall the old librespot:
pip uninstall librespotThen install the snapshot version:
pip install git+https://github.com/kokarare1212/librespot-pythonThat fixed it for me.
Thank you for the tip. I previously did a force reinstall via pip: pip install --force-reinstall librespot
That did not bring any success so far. In the second step, I replaced the core.py with the suggested one.
Unfortunately, a new problem occurred after I replaced core.py in the librespot directory:
I also cannot find any oauth.py in that directory, or in any directory. Can someone help? Thanks in advance.
@lolo83560 commented on GitHub (Aug 7, 2025):
I just applied this quoted below and it worked just great for me too ! 👍
So no need to go messing around with the local copy of librespot/core.py IMHO...
@lolo83560 commented on GitHub (Aug 7, 2025):
no, unfortunately it does not ... until the main branch of librespot gets officially patched, I guess
@matseee commented on GitHub (Aug 7, 2025):
A reinstall of zotify should also work.
@lolo83560 commented on GitHub (Aug 7, 2025):
yes ... unless you're using your own modded fork of the original zotify trunk and not the present one from Googolplexed0
(such is my case)
In this case, the most generic & convenient way to force the use of librespot-python package from kokarare1212, instead of the original one from librespot-org, is to add a setup.py file in your local zotify root directory (= where are stored all the .py sources).
Setup.py contents
@U2EZNeko commented on GitHub (Aug 7, 2025):
Librespot core update fixed it for me too.
@Googolplexed0 commented on GitHub (Aug 8, 2025):
Confirmed running this fixes the issue. I asked the repo owner to create a new release so that
pip install --force-reinstall librespotwill be sufficient.