[GH-ISSUE #26] Debug Logging in a File & SKIP_EXISTING Redownloads #20

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

Originally created by @astralalgorithm on GitHub (Jun 20, 2025).
Original GitHub issue: https://github.com/Googolplexed0/zotify/issues/26

Originally assigned to: @Googolplexed0 on GitHub.

userland@localhost:~$

0%| | 0/1 [00:07<?, ?url/s]
0%| | 0/1 [00:07<?, ?url/s]
0%| | 0/1 [00:07<?, ?url/s]
0%| | 0/1 [00:06<?, ?url/s]
0%| | 0/1 [00:06<?, ?url/s]
0%| | 0/1 [00:06<?, ?url/s]
0%| | 0/1 [00:06<?, ?url/s]
0%| | 0/1 [00:06<?, ?url/s]
t. thats what it says after the attempt to diwnload an album. it randomly skips tracks from an album saying they are unavailable. this is close it seems. draftkinners zotify didnt make it this far. any help or advice is appreciated. i thought to look at permissions for the download directory in config.json and thats drwxrwx--- so no permission for other. I dont think thats why but i dont know. another thing i noticed is i can go to host-rootfs/sdcard/music. but if i go to mnt/sdcard or /sdcard/music from root i get "cannot open "." operation not permitted" . weird. they appear to have the same permissions though.

Originally created by @astralalgorithm on GitHub (Jun 20, 2025). Original GitHub issue: https://github.com/Googolplexed0/zotify/issues/26 Originally assigned to: @Googolplexed0 on GitHub. userland@localhost:~$ 0%| | 0/1 [00:07<?, ?url/s] 0%| | 0/1 [00:07<?, ?url/s] 0%| | 0/1 [00:07<?, ?url/s] 0%| | 0/1 [00:06<?, ?url/s] 0%| | 0/1 [00:06<?, ?url/s] 0%| | 0/1 [00:06<?, ?url/s] 0%| | 0/1 [00:06<?, ?url/s] 0%| | 0/1 [00:06<?, ?url/s] t. thats what it says after the attempt to diwnload an album. it randomly skips tracks from an album saying they are unavailable. this is close it seems. draftkinners zotify didnt make it this far. any help or advice is appreciated. i thought to look at permissions for the download directory in config.json and thats drwxrwx--- so no permission for other. I dont think thats why but i dont know. another thing i noticed is i can go to host-rootfs/sdcard/music. but if i go to mnt/sdcard or /sdcard/music from root i get "cannot open "." operation not permitted" . weird. they appear to have the same permissions though.
kerem 2026-02-27 04:57:08 +03:00
Author
Owner

@astralalgorithm commented on GitHub (Jun 21, 2025):

so if i understand correctly, that album is unavailable entirely on spotify. it used to be on there i guess? but then license holder requested it taken down? but spotify leave the page up to make it appear like they have said album. (serenity now) lol.

<!-- gh-comment-id:2993825275 --> @astralalgorithm commented on GitHub (Jun 21, 2025): so if i understand correctly, that album is unavailable entirely on spotify. it used to be on there i guess? but then license holder requested it taken down? but spotify leave the page up to make it appear like they have said album. (serenity now) lol.
Author
Owner

@astralalgorithm commented on GitHub (Jun 22, 2025):

so i think i managed to get this working. ffmpeg was erroring after every track was downloaded. i got lucky and caughtba partial glimpse of the errror before the next track progress overwrote that line. it pointed me to download execstack and prelink deb from debian ftp. then i issued "sudo dpkg -i prelink_0.0.2013xxx.deb execstack_0.0.2013xxx.deb
sudo execstack -c /usr/lib/arm-linux-gnueabihf/libx264.so.164". now how can i view the zotify error log to see if there were errors? i had the screen go to sleep and downloading got paused. so i restarted the command and it finished the rest buti would like to know there werent errors. so please can anybody say where or how i can view the relevant zotify log?

<!-- gh-comment-id:2994273296 --> @astralalgorithm commented on GitHub (Jun 22, 2025): so i think i managed to get this working. ffmpeg was erroring after every track was downloaded. i got lucky and caughtba partial glimpse of the errror before the next track progress overwrote that line. it pointed me to download execstack and prelink deb from debian ftp. then i issued "sudo dpkg -i prelink_0.0.2013xxx.deb execstack_0.0.2013xxx.deb sudo execstack -c /usr/lib/arm-linux-gnueabihf/libx264.so.164". now how can i view the zotify error log to see if there were errors? i had the screen go to sleep and downloading got paused. so i restarted the command and it finished the rest buti would like to know there werent errors. so please can anybody say where or how i can view the relevant zotify log?
Author
Owner

@astralalgorithm commented on GitHub (Jun 22, 2025):

well in the config it says ffmpeg log "errors" (also printSplash is false?) though i cant find how to view ffmpeg logs either... guess until someone can verify how to view logs i can just rerun the command to download the playlist/album and if it skips every track it had no errors originally? i know, pretty smart right lol ;p (btw my return key doesnt work on here

<!-- gh-comment-id:2994278996 --> @astralalgorithm commented on GitHub (Jun 22, 2025): well in the config it says ffmpeg log "errors" (also printSplash is false?) though i cant find how to view ffmpeg logs either... guess until someone can verify how to view logs i can just rerun the command to download the playlist/album and if it skips every track it had no errors originally? i know, pretty smart right lol ;p (btw my return key doesnt work on here
Author
Owner

@astralalgorithm commented on GitHub (Jun 22, 2025):

would be cool if there was a option in config for debug logging to a file if its not already. anyway fantastic job to all involved. thanks

<!-- gh-comment-id:2994280793 --> @astralalgorithm commented on GitHub (Jun 22, 2025): would be cool if there was a option in config for debug logging to a file if its not already. anyway fantastic job to all involved. thanks
Author
Owner

@astralalgorithm commented on GitHub (Jun 22, 2025):

rerunning the command results in redownloading! my config is set to "skip existing = true". ? why would it redownload when the original files are all there? it didnt even make a new directory, just overwrote. It skipped 3 of 17 i think. and of course the progress printing in the bash overwrites errors.

<!-- gh-comment-id:2994334616 --> @astralalgorithm commented on GitHub (Jun 22, 2025): rerunning the command results in redownloading! my config is set to "skip existing = true". ? why would it redownload when the original files are all there? it didnt even make a new directory, just overwrote. It skipped 3 of 17 i think. and of course the progress printing in the bash overwrites errors.
Author
Owner

@astralalgorithm commented on GitHub (Jun 22, 2025):

just saw the post in pull requests. just experienced redownload of an album trying to check if any song had errors. my config has skip existing set to true. so do i need to turn on skip previously downloaded? though i worry that would skip even if the song was incomplete?

<!-- gh-comment-id:2994339815 --> @astralalgorithm commented on GitHub (Jun 22, 2025): just saw the post in pull requests. just experienced redownload of an album trying to check if any song had errors. my config has skip existing set to true. so do i need to turn on skip previously downloaded? though i worry that would skip even if the song was incomplete?
Author
Owner

@Googolplexed0 commented on GitHub (Jun 22, 2025):

A lot going on here, but not enough specifics for me to help right away.

ffmpeg errors should only interfere in the download process if you are transcoding from .ogg to another format/codec, by not transcoding you can avoid any potential issues.

There is no error logging to file, error logs are all written to the terminal. Adding a logs.txt record config option is something I can look into adding in the near future. The progress bars should not be overwriting error messages, so I'd like a more detailed description of this, since my system doesn't behave this way.

SKIP_EXISTING should skip any song that's been added to the .song_ids file, where additions to the .song_ids file only occur after a successful download. SKIP_PREVIOUSLY_DOWNLOADED uses the same system, but with one .song_archive file at the ROOT_PATH. It is possible that these songs had errors on previous attempts and needed redownloading. To get a better look at the redownloading, you can use the --debug flag to print some extra diagnostic/logging info to the terminal.

If you could attach your config.json and the album you are downloading I would be happy to help diagnose what's going on.

<!-- gh-comment-id:2994387219 --> @Googolplexed0 commented on GitHub (Jun 22, 2025): A lot going on here, but not enough specifics for me to help right away. ffmpeg errors should only interfere in the download process if you are transcoding from `.ogg` to another format/codec, by not transcoding you can avoid any potential issues. There is no error logging to file, error logs are all written to the terminal. Adding a `logs.txt` record config option is something I can look into adding in the near future. The progress bars should not be overwriting error messages, so I'd like a more detailed description of this, since my system doesn't behave this way. `SKIP_EXISTING` should skip any song that's been added to the `.song_ids` file, where additions to the `.song_ids` file only occur after a successful download. `SKIP_PREVIOUSLY_DOWNLOADED` uses the same system, but with one `.song_archive` file at the `ROOT_PATH`. It is possible that these songs had errors on previous attempts and needed redownloading. To get a better look at the redownloading, you can use the `--debug` flag to print some extra diagnostic/logging info to the terminal. If you could attach your `config.json` and the album you are downloading I would be happy to help diagnose what's going on.
Author
Owner

@astralalgorithm commented on GitHub (Jun 23, 2025):

i will try to find a way to show you how it looks. its bizarre, in the config i remember every print option is enab led excluding splash. when im downloading the track progress prints backwards verticall y in the bash lol it overwrites pr evious lines like "fetching track". eventually when it reac hes the beginning it stops its ascent and just updates that top line percentage rather than a line above rhe last percent update.

<!-- gh-comment-id:2997651856 --> @astralalgorithm commented on GitHub (Jun 23, 2025): i will try to find a way to show you how it looks. its bizarre, in the config i remember every print option is enab led excluding splash. when im downloading the track progress prints backwards verticall y in the bash lol it overwrites pr evious lines like "fetching track". eventually when it reac hes the beginning it stops its ascent and just updates that top line percentage rather than a line above rhe last percent update.
Author
Owner

@astralalgorithm commented on GitHub (Jun 23, 2025):

(EDIT: I transferred by using command line between android and windows. though still wish i could drag and drop. ) im trying to transfer the downloaded mp3s to redownload to show you what it looks like and the mp3s are not visible on my windows pc. any idea why i have that problem? (anyway will report back asap)

<!-- gh-comment-id:2997706124 --> @astralalgorithm commented on GitHub (Jun 23, 2025): (EDIT: I transferred by using command line between android and windows. though still wish i could drag and drop. ) im trying to transfer the downloaded mp3s to redownload to show you what it looks like and the mp3s are not visible on my windows pc. any idea why i have that problem? (anyway will report back asap)
Author
Owner

@astralalgorithm commented on GitHub (Jun 24, 2025):

redownloaded. wasnt able to figure out how to show you but my description is accurate. i noticed every track progress update listed the target file size. so i watched the entire albym download babysitting the percent. i wrote down each files size printed during download. none of the downloaded files size match exactly though? they are a few .xx Meg over generally but a few are under by kbs? like 1 track zotify reported as 4.66Meg but the file after download is 4.54MB, though there seemingly were no errors. So is that normal or whats the deal with that mismatch? (by the way the 1st double download album and the earlier fresh redownload both compared side by side in windows are the same file sizes respectively) seems like everything i try to do to confirm the files are good leaves me uncertain kinda? lol ever heard of the observer effect? What about murphy? or bob the uncle? ohhhh yeah, the config........ but wait back to the file size mismatch wait wait whey, is it reporting the ogg vorbis file size during download? but after thats converted its a dif size? just a guess

<!-- gh-comment-id:2998470462 --> @astralalgorithm commented on GitHub (Jun 24, 2025): redownloaded. wasnt able to figure out how to show you but my description is accurate. i noticed every track progress update listed the target file size. so i watched the entire albym download babysitting the percent. i wrote down each files size printed during download. none of the downloaded files size match exactly though? they are a few .xx Meg over generally but a few are under by kbs? like 1 track zotify reported as 4.66Meg but the file after download is 4.54MB, though there seemingly were no errors. So is that normal or whats the deal with that mismatch? (by the way the 1st double download album and the earlier fresh redownload both compared side by side in windows are the same file sizes respectively) seems like everything i try to do to confirm the files are good leaves me uncertain kinda? lol ever heard of the observer effect? What about murphy? or bob the uncle? ohhhh yeah, the config........ but wait back to the file size mismatch wait wait whey, is it reporting the ogg vorbis file size during download? but after thats converted its a dif size? just a guess
Author
Owner

@astralalgorithm commented on GitHub (Jun 24, 2025):


    "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": "1",
    "DOWNLOAD_REAL_TIME": "True",
    "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": "mp3",
    "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": "False",
    "LYRICS_LOCATION": "",
    "ALWAYS_CHECK_LYRICS": "False",
    "LANGUAGE": "en",
    "MD_DISC_TRACK_TOTALS": "True",
    "MD_SAVE_GENRES": "False",
    "MD_ALLGENRES": "False",
    "MD_GENREDELIMITER": ", ",
    "MD_ARTISTDELIMITER": ", ",
    "MD_SAVE_LYRICS": "True",
    "ALBUM_ART_JPG_FILE": "False",
    "RETRY_ATTEMPTS": "1",
    "CHUNK_SIZE": "20000",
    "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"
'
<!-- gh-comment-id:2998534533 --> @astralalgorithm commented on GitHub (Jun 24, 2025): ``` "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": "1", "DOWNLOAD_REAL_TIME": "True", "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": "mp3", "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": "False", "LYRICS_LOCATION": "", "ALWAYS_CHECK_LYRICS": "False", "LANGUAGE": "en", "MD_DISC_TRACK_TOTALS": "True", "MD_SAVE_GENRES": "False", "MD_ALLGENRES": "False", "MD_GENREDELIMITER": ", ", "MD_ARTISTDELIMITER": ", ", "MD_SAVE_LYRICS": "True", "ALBUM_ART_JPG_FILE": "False", "RETRY_ATTEMPTS": "1", "CHUNK_SIZE": "20000", "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" ' ```
Author
Owner

@astralalgorithm commented on GitHub (Jun 24, 2025):

got any advice for optimal settings?

<!-- gh-comment-id:2998535320 --> @astralalgorithm commented on GitHub (Jun 24, 2025): got any advice for optimal settings?
Author
Owner

@astralalgorithm commented on GitHub (Jun 24, 2025):

rsion, status, reason = self._read_status()                               
                              ^^^^^^^^^^^^^^^^^^^                               
  File "/usr/lib/python3.11/http/client.py", line 287, in _read_status          
    raise RemoteDisconnected("Remote end closed connection without"             
http.client.RemoteDisconnected: Remote end closed connection without response   
                                                                                
During handling of the above exception, another exception occurred:             
                                                                                
Traceback (most recent call last):                                              
  File "/root/.local/pipx/venvs/zotify/lib/python3.11/site-packages/requests/adapters.py", line 667, in send                                                    
    resp = conn.urlopen(                                                        
           ^^^^^^^^^^^^^                                                        
  File "/root/.local/pipx/venvs/zotify/lib/python3.11/site-packages/urllib3/connectionpool.py", line 841, in urlopen                                            
    retries = retries.increment(                                                
              ^^^^^^^^^^^^^^^^^^                                                
  File "/root/.local/pipx/venvs/zotify/lib/python3.11/site-packages/urllib3/util/retry.py", line 474, in increment                                              
    raise reraise(type(error), error, _stacktrace)                              
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                              
  File "/root/.local/pipx/venvs/zotify/lib/python3.11/site-packages/urllib3/util/util.py", line 38, in reraise                                                  
    raise value.with_traceback(tb)                                              
  File "/root/.local/pipx/venvs/zotify/lib/python3.11/site-packages/urllib3/connectionpool.py", line 787, in urlopen                                            
    response = self._make_request(                                              
               ^^^^^^^^^^^^^^^^^^^                                              
  File "/root/.local/pipx/venvs/zotify/lib/python3.11/site-packages/urllib3/connectionpool.py", line 534, in _make_request                                      
    response = conn.getresponse()                                               
               ^^^^^^^^^^^^^^^^^^                                               
  File "/root/.local/pipx/venvs/zotify/lib/python3.11/site-packages/urllib3/connection.py", line 565, in getresponse                                            
    httplib_response = super().getresponse()                                    
                       ^^^^^^^^^^^^^^^^^^^^^                                    
  File "/usr/lib/python3.11/http/client.py", line 1374, in getresponse          
    response.begin()                                                            
  File "/usr/lib/python3.11/http/client.py", line 318, in begin                 
    version, status, reason = self._read_status()                               
                              ^^^^^^^^^^^^^^^^^^^                               
  File "/usr/lib/python3.11/http/client.py", line 287, in _read_status          
    raise RemoteDisconnected("Remote end closed connection without"             
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))                                  
                                                                                
During handling of the above exception, another exception occurred:             
                                                                                
Traceback (most recent call last):                                              
  File "/root/.local/pipx/venvs/zotify/lib/python3.11/site-packages/zotify/track.py", line 283, in download_track                                               
    stream = Zotify.get_content_stream(track, Zotify.DOWNLOAD_QUALITY)          
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^          
  File "/root/.local/pipx/venvs/zotify/lib/python3.11/site-packages/zotify/zotify.py", line 59, in get_content_stream                                           
    return cls.SESSION.content_feeder().load(content_id, VorbisOnlyAudioQuality(quality), False, None)                                                          
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                          
  File "/root/.local/pipx/venvs/zotify/lib/python3.11/site-packages/librespot/audio/__init__.py", line 739, in load                                             
    return self.load_track(playable_id, audio_quality_picker, preload,          
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^          
  File "/root/.local/pipx/venvs/zotify/lib/python3.11/site-packages/librespot/audio/__init__.py", line 800, in load_track                                       
    return self.load_stream(file, track, None, preload, halt_listener)          
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^          
  File "/root/.local/pipx/venvs/zotify/lib/python3.11/site-packages/librespot/audio/__init__.py", line 754, in load_stream                                      
    return CdnFeedHelper.load_track(self.__session, track, file,                
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                
  File "/root/.local/pipx/venvs/zotify/lib/python3.11/site-packages/librespot/audio/__init__.py", line 342, in load_track                                       
    streamer = session.cdn().stream_file(file, key, url, halt_listener)         
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^         
  File "/root/.local/pipx/venvs/zotify/lib/python3.11/site-packages/librespot/audio/__init__.py", line 441, in stream_file                                      
    return CdnManager.Streamer(      
<!-- gh-comment-id:3002159791 --> @astralalgorithm commented on GitHub (Jun 24, 2025): ``` rsion, status, reason = self._read_status() ^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/http/client.py", line 287, in _read_status raise RemoteDisconnected("Remote end closed connection without" http.client.RemoteDisconnected: Remote end closed connection without response During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/root/.local/pipx/venvs/zotify/lib/python3.11/site-packages/requests/adapters.py", line 667, in send resp = conn.urlopen( ^^^^^^^^^^^^^ File "/root/.local/pipx/venvs/zotify/lib/python3.11/site-packages/urllib3/connectionpool.py", line 841, in urlopen retries = retries.increment( ^^^^^^^^^^^^^^^^^^ File "/root/.local/pipx/venvs/zotify/lib/python3.11/site-packages/urllib3/util/retry.py", line 474, in increment raise reraise(type(error), error, _stacktrace) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/pipx/venvs/zotify/lib/python3.11/site-packages/urllib3/util/util.py", line 38, in reraise raise value.with_traceback(tb) File "/root/.local/pipx/venvs/zotify/lib/python3.11/site-packages/urllib3/connectionpool.py", line 787, in urlopen response = self._make_request( ^^^^^^^^^^^^^^^^^^^ File "/root/.local/pipx/venvs/zotify/lib/python3.11/site-packages/urllib3/connectionpool.py", line 534, in _make_request response = conn.getresponse() ^^^^^^^^^^^^^^^^^^ File "/root/.local/pipx/venvs/zotify/lib/python3.11/site-packages/urllib3/connection.py", line 565, in getresponse httplib_response = super().getresponse() ^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/http/client.py", line 1374, in getresponse response.begin() File "/usr/lib/python3.11/http/client.py", line 318, in begin version, status, reason = self._read_status() ^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/http/client.py", line 287, in _read_status raise RemoteDisconnected("Remote end closed connection without" urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/root/.local/pipx/venvs/zotify/lib/python3.11/site-packages/zotify/track.py", line 283, in download_track stream = Zotify.get_content_stream(track, Zotify.DOWNLOAD_QUALITY) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/pipx/venvs/zotify/lib/python3.11/site-packages/zotify/zotify.py", line 59, in get_content_stream return cls.SESSION.content_feeder().load(content_id, VorbisOnlyAudioQuality(quality), False, None) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/pipx/venvs/zotify/lib/python3.11/site-packages/librespot/audio/__init__.py", line 739, in load return self.load_track(playable_id, audio_quality_picker, preload, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/pipx/venvs/zotify/lib/python3.11/site-packages/librespot/audio/__init__.py", line 800, in load_track return self.load_stream(file, track, None, preload, halt_listener) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/pipx/venvs/zotify/lib/python3.11/site-packages/librespot/audio/__init__.py", line 754, in load_stream return CdnFeedHelper.load_track(self.__session, track, file, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/pipx/venvs/zotify/lib/python3.11/site-packages/librespot/audio/__init__.py", line 342, in load_track streamer = session.cdn().stream_file(file, key, url, halt_listener) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/pipx/venvs/zotify/lib/python3.11/site-packages/librespot/audio/__init__.py", line 441, in stream_file return CdnManager.Streamer( ```
Author
Owner

@astralalgorithm commented on GitHub (Jun 24, 2025):

managed to copy that after a track was skipped due to an error but everytime i tried to scroll up highlighting the shell to copy the beginning it would jump back down to the ongoing download progress update. frustrating... so im unsure why that track was skipped... keep in mind my config is almost entirely default. i changed downloadrealtime to true after i read it false could prevent more than 18 tracks but besides that i dont think i changed anything except updating download path... also keep in mind im on a touch screen in userland debian so... when there was an error it printed quite a lot downwards which made rhe progress update on remaining downloads with plenty of space instead of being scrunched against the ceiling of the shell.

<!-- gh-comment-id:3002169023 --> @astralalgorithm commented on GitHub (Jun 24, 2025): managed to copy that after a track was skipped due to an error but everytime i tried to scroll up highlighting the shell to copy the beginning it would jump back down to the ongoing download progress update. frustrating... so im unsure why that track was skipped... keep in mind my config is almost entirely default. i changed downloadrealtime to true after i read it false could prevent more than 18 tracks but besides that i dont think i changed anything except updating download path... also keep in mind im on a touch screen in userland debian so... when there was an error it printed quite a lot downwards which made rhe progress update on remaining downloads with plenty of space instead of being scrunched against the ceiling of the shell.
Author
Owner

@astralalgorithm commented on GitHub (Jun 24, 2025):

ERROR: SKIPPING SONG - GENERAL DOWNLOAD ERROR

<!-- gh-comment-id:3002171037 --> @astralalgorithm commented on GitHub (Jun 24, 2025): ### ERROR: SKIPPING SONG - GENERAL DOWNLOAD ERROR ###
Author
Owner

@astralalgorithm commented on GitHub (Jun 24, 2025):

https://imgur.com/a/z87rs0e https://imgur.com/a/3EIRlNw

<!-- gh-comment-id:3002185698 --> @astralalgorithm commented on GitHub (Jun 24, 2025): https://imgur.com/a/z87rs0e https://imgur.com/a/3EIRlNw
Author
Owner

@astralalgorithm commented on GitHub (Jun 24, 2025):

in those images you can see how the progress update prints vertical in the shell. in the 2nd image you can see remnants of previous updates on a few lines but the higher percentage lines were overwritten so it appears like the download was only twenty somethng percent but it really completed though the next song progress took its place etc

<!-- gh-comment-id:3002189667 --> @astralalgorithm commented on GitHub (Jun 24, 2025): in those images you can see how the progress update prints vertical in the shell. in the 2nd image you can see remnants of previous updates on a few lines but the higher percentage lines were overwritten so it appears like the download was only twenty somethng percent but it really completed though the next song progress took its place etc
Author
Owner

@astralalgorithm commented on GitHub (Jun 25, 2025):

i had the idea to disable some print features to hopefully lighten the load but i really want to see the progress. not sure what to do in that case... guess i could disable download progress and only print errors or skips? but darn i really would like to see the %. also i am 99.9% sure the album i download makes no difference. but if you do want the link to the previously mentioned unavailable album let me know.

<!-- gh-comment-id:3002196982 --> @astralalgorithm commented on GitHub (Jun 25, 2025): i had the idea to disable some print features to hopefully lighten the load but i really want to see the progress. not sure what to do in that case... guess i could disable download progress and only print errors or skips? but darn i really would like to see the %. also i am 99.9% sure the album i download makes no difference. but if you do want the link to the previously mentioned unavailable album let me know.
Author
Owner

@astralalgorithm commented on GitHub (Jun 25, 2025):

another question on the heap. (sorry) if the session gets closed or terminated after a download? would that mess up skipping existing? i imagine no, it shouldnt but grasping at straws to get any of this. but i have been experiencing crashes when i switch between tabs a lot. so sometimes i have to open a new session. just puffing the sherlock looking for any culprit.

<!-- gh-comment-id:3002217554 --> @astralalgorithm commented on GitHub (Jun 25, 2025): another question on the heap. (sorry) if the session gets closed or terminated after a download? would that mess up skipping existing? i imagine no, it shouldnt but grasping at straws to get any of this. but i have been experiencing crashes when i switch between tabs a lot. so sometimes i have to open a new session. just puffing the sherlock looking for any culprit.
Author
Owner

@astralalgorithm commented on GitHub (Jun 25, 2025):

well, good news. just reran the last album that last error / skip happened on and it skipped everything it had got the 1st time seemingly... so maybe it IS that album that allows redownloads of existing? or maybe it was a fluke

<!-- gh-comment-id:3002371587 --> @astralalgorithm commented on GitHub (Jun 25, 2025): well, good news. just reran the last album that last error / skip happened on and it skipped everything it had got the 1st time seemingly... so maybe it IS that album that allows redownloads of existing? or maybe it was a fluke
Author
Owner

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

in those images you can see how the progress update prints vertical in the shell. in the 2nd image you can see remnants of previous updates on a few lines but the higher percentage lines were overwritten so it appears like the download was only twenty something percent but it really completed though the next song progress took its place etc

The overwriting happens because the progress print system relies on using carriage return characters (\r) and moving cursors back up to the previous line(s) (\033[A through \033[K), which your shell/terminal (that looks fairly old) may not fully support. There are not any workarounds to this if unsupported AFAIK. Best solution would be to disable all but one progress bar and see if that works.

another question on the heap. (sorry) if the session gets closed or terminated after a download? would that mess up skipping existing?

No, this would have no effect unless you manage to precisely stop after the ffmpeg conversion but before writing the song_id to the archive, which is (in all practicality) impossible. Even if it did occur, it would only affect the single song.

also i am 99.9% sure the album i download makes no difference. but if you do want the link to the previously mentioned unavailable album let me know.

Do link the album and the specific songs that are being skipped. If I can recreate the issue exactly then there might be hope for a fix, otherwise it is likely an issue with your specific system.

<!-- gh-comment-id:3050497524 --> @Googolplexed0 commented on GitHub (Jul 8, 2025): > in those images you can see how the progress update prints vertical in the shell. in the 2nd image you can see remnants of previous updates on a few lines but the higher percentage lines were overwritten so it appears like the download was only twenty something percent but it really completed though the next song progress took its place etc The overwriting happens because the progress print system relies on using carriage return characters (`\r`) and moving cursors back up to the previous line(s) (`\033[A` through `\033[K`), which your shell/terminal (that looks fairly old) may not fully support. There are not any workarounds to this if unsupported AFAIK. Best solution would be to disable all but one progress bar and see if that works. > another question on the heap. (sorry) if the session gets closed or terminated after a download? would that mess up skipping existing? No, this would have no effect unless you manage to precisely stop after the ffmpeg conversion but before writing the song_id to the archive, which is (in all practicality) impossible. Even if it did occur, it would only affect the single song. > also i am 99.9% sure the album i download makes no difference. but if you do want the link to the previously mentioned unavailable album let me know. Do link the album and the specific songs that are being skipped. If I can recreate the issue _exactly_ then there might be hope for a fix, otherwise it is likely an issue with your specific system.
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#20
No description provided.