Skip to content

Cannot access local variable 'response' where it is not associated with a value #559

@cserl

Description

@cserl

You must use the search before you create an issue!

  • I did use the search, I promise!

What happened?

Log contains this error message scattered multiple times over a longer test period:
cannot access local variable 'response' where it is not associated with a value

Potential cause: referencing response inside an exception path where the request never returned
Potential fix idea: guard access (response is not None) or pull needed fields from the caught exception.

Version App

v0.26.7

What operating system do you use?

Linux

Version OS

Ubuntu 24.04.3 LTS

Relevant log output

2025-09-28 02:32:55 > Downloaded item 'Artist name - album name'.
2025-09-28 02:32:56 > �[32mNext download will start in 4.7 seconds.�[0m
2025-09-28 02:38:40 > �[31mcannot access local variable 'response' where it is not associated with a value�[0m
2025-09-28 02:38:54 > Downloaded item 'Artist name - album name'.
2025-09-28 02:38:54 > Downloaded item 'Artist name - album name'.
2025-09-28 02:38:54 > Downloaded item 'Artist name - album name'.
2025-09-28 02:38:55 > Downloaded item 'Artist name - album name'.
2025-09-28 02:38:55 > Downloaded item 'Artist name - album name'.
2025-09-28 02:38:56 > �[32mNext download will start in 3.4 seconds.�[0m
2025-09-28 02:38:57 > �[32mNext download will start in 3.3 seconds.�[0m
2025-09-28 02:38:57 > �[32mNext download will start in 4.1 seconds.�[0m
2025-09-28 02:38:57 > �[32mNext download will start in 4.9 seconds.�[0m
2025-09-28 02:38:58 > �[32mNext download will start in 4.5 seconds.�[0m
2025-09-28 02:39:06 > Downloaded item 'Artist name - album name'.

Your settings

{
    "skip_existing": true,
    "lyrics_embed": true,
    "lyrics_file": false,
    "video_download": false,
    "download_delay": true,
    "download_base_path": "/home/admin/smb4k/ABC/Defghi/Jklmn",
    "quality_audio": "HI_RES_LOSSLESS",
    "quality_video": "480",
    "format_album": "Albums/{album_artist} - {album_title}{album_explicit}/{track_volume_num_optional}{album_track_num}. {artist_name} - {track_title}{album_explicit}",
    "format_playlist": "Playlists/{playlist_name}/{list_pos}. {artist_name} - {track_title}",
    "format_mix": "Mix/{mix_name}/{artist_name} - {track_title}",
    "format_track": "Tracks/{artist_name} - {track_title}{track_explicit}",
    "format_video": "Videos/{artist_name} - {track_title}{track_explicit}",
    "video_convert_mp4": false,
    "path_binary_ffmpeg": "/usr/bin/ffmpeg",
    "metadata_cover_dimension": "origin",
    "metadata_cover_embed": true,
    "cover_album_file": true,
    "extract_flac": true,
    "downloads_simultaneous_per_track_max": 20,
    "download_delay_sec_min": 3.0,
    "download_delay_sec_max": 5.0,
    "album_track_num_pad_min": 1,
    "downloads_concurrent_max": 5,
    "symlink_to_track": false,
    "playlist_create": false,
    "metadata_replay_gain": true,
    "metadata_write_url": true
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingquestionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions