[GH-ISSUE #46] ValueError when converting using ffmpeg #37

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

Originally created by @ulyxie on GitHub (Aug 8, 2025).
Original GitHub issue: https://github.com/Googolplexed0/zotify/issues/46

Originally assigned to: @Googolplexed0 on GitHub.

Bug Description
ValueError is getting raised when trying to convert using FFmpeg.

Bug Triggering Command
ValueError in config.py when calling Zotify.CONFIG.get_ffmpeg_log_level()

Error Traceback / Logs

DEBUG
Duplicate Check
File Already Exists: False
song_id in Local Archive: False
song_id in Global Archive: True

        [∙∙∙] Preparing download...
        [∙●∙] Fetching genre information... 
        [∙●∙] Fetching lyrics...
###   ERROR:  SKIPPING SONG - GENERAL DOWNLOAD ERROR   ###
###   Track_Label: Neptunica - The Rhythm of the Night - Track_ID: 41T043SzZ8VPpQgvg301ZS   ###

######################################################################################################################
{ 'playlist': 'Party',
  'playlist_id': '2dKgLn0HRnbC346SdNgvUv',
  'playlist_num': '26',
  'playlist_track': 'The Rhythm of the Night',
  'playlist_track_id': '41T043SzZ8VPpQgvg301ZS'}
######################################################################################################################

Traceback (most recent call last):
  File "/home/helio/zotify/zotify/track.py", line 333, in download_track
    time_elapsed_ffmpeg = convert_audio_format(track_path_temp)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/helio/zotify/zotify/track.py", line 393, in convert_audio_format
    global_options=['-y', '-hide_banner', f'-loglevel {Zotify.CONFIG.get_ffmpeg_log_level()}'],
                                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/helio/zotify/zotify/config.py", line 440, in get_ffmpeg_log_level
    raise ValueError()
ValueError

Command
zotify --download-lyrics=true --download-format=mp3 --download-quality=very_high -rp . -ie True --md-allgenres True --retry-attempts 5 --bulk-wait-time=10 -rt True --debug -f songs.txt

Config File

{
    "DEBUG": "True",
    "ROOT_PATH": "~/Music/Zotify Music",
    "SAVE_CREDENTIALS": "True",
    "CREDENTIALS_LOCATION": "",
    "OUTPUT": "",
    "OUTPUT_PLAYLIST": "{playlist}/{artist}_{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": "~/Music/Zotify Podcasts",
    "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": "copy",
    "DOWNLOAD_QUALITY": "auto",
    "TRANSCODE_BITRATE": "auto",
    "SONG_ARCHIVE_LOCATION": "",
    "DISABLE_SONG_ARCHIVE": "False",
    "DISABLE_DIRECTORY_ARCHIVES": "False",
    "SKIP_EXISTING": "True",
    "SKIP_PREVIOUSLY_DOWNLOADED": "False",
    "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": "True",
    "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": "warn"
}

Zotify Version
v0.9.12
Additional Context
None that comes to mind

Originally created by @ulyxie on GitHub (Aug 8, 2025). Original GitHub issue: https://github.com/Googolplexed0/zotify/issues/46 Originally assigned to: @Googolplexed0 on GitHub. **Bug Description** ValueError is getting raised when trying to convert using FFmpeg. **Bug Triggering Command** ValueError in config.py when calling Zotify.CONFIG.get_ffmpeg_log_level() **Error Traceback / Logs** ``` DEBUG Duplicate Check File Already Exists: False song_id in Local Archive: False song_id in Global Archive: True [∙∙∙] Preparing download... [∙●∙] Fetching genre information... [∙●∙] Fetching lyrics... ### ERROR: SKIPPING SONG - GENERAL DOWNLOAD ERROR ### ### Track_Label: Neptunica - The Rhythm of the Night - Track_ID: 41T043SzZ8VPpQgvg301ZS ### ###################################################################################################################### { 'playlist': 'Party', 'playlist_id': '2dKgLn0HRnbC346SdNgvUv', 'playlist_num': '26', 'playlist_track': 'The Rhythm of the Night', 'playlist_track_id': '41T043SzZ8VPpQgvg301ZS'} ###################################################################################################################### Traceback (most recent call last): File "/home/helio/zotify/zotify/track.py", line 333, in download_track time_elapsed_ffmpeg = convert_audio_format(track_path_temp) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/helio/zotify/zotify/track.py", line 393, in convert_audio_format global_options=['-y', '-hide_banner', f'-loglevel {Zotify.CONFIG.get_ffmpeg_log_level()}'], ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/helio/zotify/zotify/config.py", line 440, in get_ffmpeg_log_level raise ValueError() ValueError ``` **Command** `zotify --download-lyrics=true --download-format=mp3 --download-quality=very_high -rp . -ie True --md-allgenres True --retry-attempts 5 --bulk-wait-time=10 -rt True --debug -f songs.txt` **Config File** ```json { "DEBUG": "True", "ROOT_PATH": "~/Music/Zotify Music", "SAVE_CREDENTIALS": "True", "CREDENTIALS_LOCATION": "", "OUTPUT": "", "OUTPUT_PLAYLIST": "{playlist}/{artist}_{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": "~/Music/Zotify Podcasts", "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": "copy", "DOWNLOAD_QUALITY": "auto", "TRANSCODE_BITRATE": "auto", "SONG_ARCHIVE_LOCATION": "", "DISABLE_SONG_ARCHIVE": "False", "DISABLE_DIRECTORY_ARCHIVES": "False", "SKIP_EXISTING": "True", "SKIP_PREVIOUSLY_DOWNLOADED": "False", "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": "True", "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": "warn" } ``` **Zotify Version** v0.9.12 **Additional Context** None that comes to mind
kerem 2026-02-27 04:57:13 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@ulyxie commented on GitHub (Aug 8, 2025):

You can close this, "warn" is not a valid value for a log level anymore. I do suggest adding warn back as I would say its one of the standard shorthand for warning

<!-- gh-comment-id:3169223443 --> @ulyxie commented on GitHub (Aug 8, 2025): You can close this, "warn" is not a valid value for a log level anymore. I do suggest adding warn back as I would say its one of the standard shorthand for warning
Author
Owner

@Googolplexed0 commented on GitHub (Aug 8, 2025):

Added as alias (see 52bdb2c) and made similar exceptions a bit more clear.

<!-- gh-comment-id:3169479448 --> @Googolplexed0 commented on GitHub (Aug 8, 2025): Added as alias (see 52bdb2c) and made similar exceptions a bit more clear.
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#37
No description provided.