mirror of
https://github.com/Googolplexed0/zotify.git
synced 2026-04-25 06:15:55 +03:00
[GH-ISSUE #56] [Bug Report] AttributeError on Login5 Token (as None) After Expiry #46
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#46
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 @ulyxie on GitHub (Aug 19, 2025).
Original GitHub issue: https://github.com/Googolplexed0/zotify/issues/56
Originally assigned to: @Googolplexed0 on GitHub.
Bug Description
After a while of downloading my long playlists, it crashes with
AttributeError: 'NoneType' object has no attribute 'access_token'. From starting Zotify via the command, it took roughly 3703 seconds (or slightly more than an hour and one minute) before it crashed on the AttributeError.Bug Triggering Command
songs.txt contains about 13 playlists, some having upwards of 600 songs. This is being downloaded in real time.
Error Traceback / Logs
zotify_DEBUG_2025-08-18_15-12-24.log
Traceback:
Config File
config_DEBUG.json
Zotify Version
v0.9.22
Additional Context
linking my original reply to a different issue.
https://github.com/Googolplexed0/zotify/issues/48#issuecomment-3197675288
@TNAS123 commented on GitHub (Aug 19, 2025):
this is what I was seeing too.
At the moment I have downgraded to v0.9.10 for more reliability.
@Googolplexed0 commented on GitHub (Aug 21, 2025):
I am 99% sure this error is caused by the upstream librespot-python library, which means downgrading this library should have no effect. If downgrading actually does solve this, I would be extremely surprised. Working on a simple fix for this upstream.
@Googolplexed0 commented on GitHub (Aug 21, 2025):
@ulyxie See if updating to v0.9.25, which uses a new (much cleaner) patch of the upstream library, fixes this. If so, I will push the improvement upstream.
@ulyxie commented on GitHub (Aug 21, 2025):
I updated and started the run. I will report when it concludes but it will take a few hours if it is indeed fixed.
@ulyxie commented on GitHub (Aug 21, 2025):
TL;DR: it appears to be fixed now, only time will tell.
So the command is still running. About 2 hours after I wrote my previous comment, it crashed on some File exception so I reran the command with debug flag enabled. Since then it has been running happily with no issue. I will keep monitoring in case something else breaks and will trim the debug log so it's not this long. If the file exception happens again, I will create a new bug report. Sorry Googolplexed0 for being such a demanding user.
@Googolplexed0 commented on GitHub (Aug 21, 2025):
Beating the previous 1 hour limit is a good sign!
I don't think that at all, I want to help you and make this library better. Thank you for appreciating my work.
@ulyxie commented on GitHub (Aug 22, 2025):
Update on this issue. After 27 hours no exception related to this was thrown. Bad file descriptor was the exception that was thrown so I will make a new issue.
@RGPZ commented on GitHub (Aug 31, 2025):
What if I still receive this exact issue even on the latest version?
Traceback (most recent call last): File "C:\Users\Liamm\pipx\venvs\zotify\Lib\site-packages\zotify\track.py", line 207, in download_track track_metadata = get_track_metadata(track_id) File "C:\Users\Liamm\pipx\venvs\zotify\Lib\site-packages\zotify\track.py", line 53, in get_track_metadata (raw, info) = Zotify.invoke_url(f'{TRACK_URL}?ids={track_id}&market=from_token') ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Liamm\pipx\venvs\zotify\Lib\site-packages\zotify\config.py", line 648, in invoke_url headers = cls.get_auth_header() File "C:\Users\Liamm\pipx\venvs\zotify\Lib\site-packages\zotify\config.py", line 639, in get_auth_header 'Authorization': f'Bearer {cls.__get_auth_token()}', ~~~~~~~~~~~~~~~~~~~~^^ File "C:\Users\Liamm\pipx\venvs\zotify\Lib\site-packages\zotify\config.py", line 634, in __get_auth_token ).access_token ^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'access_token'