[GH-ISSUE #155] [Bug Report] ValueError: too many values to unpack (expected 2) #136

Closed
opened 2026-02-27 04:57:46 +03:00 by kerem · 3 comments
Owner

Originally created by @carlyd95 on GitHub (Jan 20, 2026).
Original GitHub issue: https://github.com/Googolplexed0/zotify/issues/155

Originally assigned to: @Googolplexed0 on GitHub.

Zotify Version
v0.15.1 (new-hierarchy)

Bug Description
Zotify ends after error ValueError: too many values to unpack (expected 2)

Bug Triggering Command
sudo -u pi /home/pi/.local/bin/zotify -f tz.txt --download-format mp3 --download-quality very_high --root-path /media/pi/X9/DJ/Music --output "{artist} - {song_name}" --download-real-time True --md-save-genres True --client-id XXXXXXXXXXXXXXXXXX --debug

Error Traceback / Logs

OUTPUT:

`DEBUG
### config_DEBUG.json saved to /home/pi/.config/zotify ###
### zotify_DEBUG_2026-01-19_23-55-40.log logging to /media/pi/X9/DJ/Music ###

[∙∙∙] Logging in...
DEBUG
Session Initialized Successfully
User Subscription Type: PREMIUM
Request Parsed as 1 URL

[∙∙∙] Fetching playlist information... [∙∙∙] Parsing playlist information... [∙∙●] Fetching bulk genre information... [∙∙●] Fetching bulk track/disc total information...
DEBUG
Total API Calls: 3

Traceback (most recent call last):
File "/home/pi/.local/bin/zotify", line 7, in
sys.exit(main())
^^^^^^
File "/home/pi/.local/share/pipx/venvs/zotify/lib/python3.11/site-packages/zotify/main.py", line 143, in main
client(args, modes)
File "/home/pi/.local/share/pipx/venvs/zotify/lib/python3.11/site-packages/zotify/app.py", line 186, in client
perform_query(args)
File "/home/pi/.local/share/pipx/venvs/zotify/lib/python3.11/site-packages/zotify/app.py", line 178, in perform_query
raise e
File "/home/pi/.local/share/pipx/venvs/zotify/lib/python3.11/site-packages/zotify/app.py", line 149, in perform_query
Query(Zotify.DATETIME_LAUNCH).request(urls).execute()
File "/home/pi/.local/share/pipx/venvs/zotify/lib/python3.11/site-packages/zotify/api.py", line 1509, in execute
self.download()
File "/home/pi/.local/share/pipx/venvs/zotify/lib/python3.11/site-packages/zotify/api.py", line 1454, in download
nonskipped = [ps for ps in pss if not ps.check_skippable()] # handles already downloaded
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/pi/.local/share/pipx/venvs/zotify/lib/python3.11/site-packages/zotify/api.py", line 1454, in
nonskipped = [ps for ps in pss if not ps.check_skippable()] # handles already downloaded
^^^^^^^^^^^^^^^^^^^^
File "/home/pi/.local/share/pipx/venvs/zotify/lib/python3.11/site-packages/zotify/api.py", line 1292, in check_skippable
return any(c.check_skippable(self) for c in self[::-1])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/pi/.local/share/pipx/venvs/zotify/lib/python3.11/site-packages/zotify/api.py", line 1292, in
return any(c.check_skippable(self) for c in self[::-1])
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/pi/.local/share/pipx/venvs/zotify/lib/python3.11/site-packages/zotify/api.py", line 580, in check_skippable
self.skippable = super().check_skippable(parent_stack)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/pi/.local/share/pipx/venvs/zotify/lib/python3.11/site-packages/zotify/api.py", line 329, in check_skippable
path = self.fill_output_template(parent_stack)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/pi/.local/share/pipx/venvs/zotify/lib/python3.11/site-packages/zotify/api.py", line 574, in fill_output_template
for replstr, md_val in repl_dict.values():
^^^^^^^^^^^^^^^
ValueError: too many values to unpack (expected 2)`

DEBUG:

zotify_DEBUG_2026-01-19_23-55-40.log

Config File
config_DEBUG.json

Additional Context
This seems to happen no matter what playlist/track I download via a file with Spotify URLs.

Originally created by @carlyd95 on GitHub (Jan 20, 2026). Original GitHub issue: https://github.com/Googolplexed0/zotify/issues/155 Originally assigned to: @Googolplexed0 on GitHub. **Zotify Version** v0.15.1 (new-hierarchy) **Bug Description** Zotify ends after error `ValueError: too many values to unpack (expected 2)` **Bug Triggering Command** sudo -u pi /home/pi/.local/bin/zotify -f tz.txt --download-format mp3 --download-quality very_high --root-path /media/pi/X9/DJ/Music --output "{artist} - {song_name}" --download-real-time True --md-save-genres True --client-id XXXXXXXXXXXXXXXXXX --debug **Error Traceback / Logs** ### OUTPUT: `DEBUG \### config_DEBUG.json saved to /home/pi/.config/zotify ### \### zotify_DEBUG_2026-01-19_23-55-40.log logging to /media/pi/X9/DJ/Music ### [∙∙∙] Logging in... DEBUG Session Initialized Successfully User Subscription Type: PREMIUM Request Parsed as 1 URL [∙∙∙] Fetching playlist information... [∙∙∙] Parsing playlist information... [∙∙●] Fetching bulk genre information... [∙∙●] Fetching bulk track/disc total information... DEBUG Total API Calls: 3 Traceback (most recent call last): File "/home/pi/.local/bin/zotify", line 7, in <module> sys.exit(main()) ^^^^^^ File "/home/pi/.local/share/pipx/venvs/zotify/lib/python3.11/site-packages/zotify/__main__.py", line 143, in main client(args, modes) File "/home/pi/.local/share/pipx/venvs/zotify/lib/python3.11/site-packages/zotify/app.py", line 186, in client perform_query(args) File "/home/pi/.local/share/pipx/venvs/zotify/lib/python3.11/site-packages/zotify/app.py", line 178, in perform_query raise e File "/home/pi/.local/share/pipx/venvs/zotify/lib/python3.11/site-packages/zotify/app.py", line 149, in perform_query Query(Zotify.DATETIME_LAUNCH).request(urls).execute() File "/home/pi/.local/share/pipx/venvs/zotify/lib/python3.11/site-packages/zotify/api.py", line 1509, in execute self.download() File "/home/pi/.local/share/pipx/venvs/zotify/lib/python3.11/site-packages/zotify/api.py", line 1454, in download nonskipped = [ps for ps in pss if not ps.check_skippable()] # handles already downloaded ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/pi/.local/share/pipx/venvs/zotify/lib/python3.11/site-packages/zotify/api.py", line 1454, in <listcomp> nonskipped = [ps for ps in pss if not ps.check_skippable()] # handles already downloaded ^^^^^^^^^^^^^^^^^^^^ File "/home/pi/.local/share/pipx/venvs/zotify/lib/python3.11/site-packages/zotify/api.py", line 1292, in check_skippable return any(c.check_skippable(self) for c in self[::-1]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/pi/.local/share/pipx/venvs/zotify/lib/python3.11/site-packages/zotify/api.py", line 1292, in <genexpr> return any(c.check_skippable(self) for c in self[::-1]) ^^^^^^^^^^^^^^^^^^^^^^^ File "/home/pi/.local/share/pipx/venvs/zotify/lib/python3.11/site-packages/zotify/api.py", line 580, in check_skippable self.skippable = super().check_skippable(parent_stack) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/pi/.local/share/pipx/venvs/zotify/lib/python3.11/site-packages/zotify/api.py", line 329, in check_skippable path = self.fill_output_template(parent_stack) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/pi/.local/share/pipx/venvs/zotify/lib/python3.11/site-packages/zotify/api.py", line 574, in fill_output_template for replstr, md_val in repl_dict.values(): ^^^^^^^^^^^^^^^ ValueError: too many values to unpack (expected 2)` ### DEBUG: [zotify_DEBUG_2026-01-19_23-55-40.log](https://github.com/user-attachments/files/24728119/zotify_DEBUG_2026-01-19_23-55-40.log) **Config File** [config_DEBUG.json](https://github.com/user-attachments/files/24727970/config_DEBUG.json) **Additional Context** This seems to happen no matter what playlist/track I download via a file with Spotify URLs.
kerem 2026-02-27 04:57:46 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@RGPZ commented on GitHub (Jan 20, 2026):

Can also confirm that I'm getting this error.

<!-- gh-comment-id:3771078742 --> @RGPZ commented on GitHub (Jan 20, 2026): Can also confirm that I'm getting this error.
Author
Owner

@carlyd95 commented on GitHub (Jan 20, 2026):

@Googolplexed0 @RGPZ

This seems to fix it:

In api.py, line 574, for replstr, md_val in repl_dict.values(): goes to for replstr, md_val in repl_dict.items():

I am not sure if this is the correct fix though.

<!-- gh-comment-id:3771090677 --> @carlyd95 commented on GitHub (Jan 20, 2026): @Googolplexed0 @RGPZ This seems to fix it: In api.py, line 574, `for replstr, md_val in repl_dict.values():` goes to `for replstr, md_val in repl_dict.items():` I am not sure if this is the correct fix though.
Author
Owner

@Googolplexed0 commented on GitHub (Jan 20, 2026):

Another typo, fixed

<!-- gh-comment-id:3773714464 --> @Googolplexed0 commented on GitHub (Jan 20, 2026): Another typo, fixed
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/zotify#136
No description provided.