[GH-ISSUE #122] Error: Connection forcibly closed, playlist has some items left to download #93

Open
opened 2026-03-04 12:28:55 +03:00 by kerem · 0 comments
Owner

Originally created by @Singoleth on GitHub (May 17, 2024).
Original GitHub issue: https://github.com/casualsnek/onthespot/issues/122

When downloading long playlists with more than 100 tracks (example: https://open.spotify.com/playlist/20W9Oh5kOMiTT6TZckEREb?si=7b1901b557df42ea), I recently get errors. The code is below. Can anybody help?

image

2024-05-17 11_40_32-casualOnTheSpot

`[2024-05-17 11:07:40,248 :: worker.downloader.SESSION_DL_TH-8ae3d03c-c7f2-4f64-a4e9-1e2ab4082754 :: worker\downloader.py -> 384: run() :: ERROR] -> Download process returned false: 3YfsavPFMqogkh9Ph4Ed5n
[2024-05-17 11:07:40,852 :: worker.utility :: worker\utility.py -> 26: run() :: INFO] -> Playlist m3u8 checking ID 20W9Oh5kOMiTT6TZckEREb
[2024-05-17 11:07:40,852 :: worker.utility :: worker\utility.py -> 52: run() :: INFO] -> Playlist 20W9Oh5kOMiTT6TZckEREb has some items left to download
[2024-05-17 11:07:44,854 :: worker.utility :: worker\utility.py -> 26: run() :: INFO] -> Playlist m3u8 checking ID 20W9Oh5kOMiTT6TZckEREb
[2024-05-17 11:07:44,855 :: worker.utility :: worker\utility.py -> 52: run() :: INFO] -> Playlist 20W9Oh5kOMiTT6TZckEREb has some items left to download
[2024-05-17 11:07:45,249 :: worker.downloader.SESSION_DL_TH-8ae3d03c-c7f2-4f64-a4e9-1e2ab4082754 :: worker\downloader.py -> 340: run() :: INFO] -> Processing download for track by id '0acFgroSAvBRgbfazTuwdF', Attempt: 0/3
[2024-05-17 11:07:45,251 :: worker.downloader.SESSION_DL_TH-8ae3d03c-c7f2-4f64-a4e9-1e2ab4082754 :: worker\downloader.py -> 97: download_track() :: ERROR] -> Metadata fetching failed for track by id '0acFgroSAvBRgbfazTuwdF', Traceback (most recent call last):
File "worker\downloader.py", line 52, in download_track
File "utils\spotify.py", line 278, in get_song_info
File "librespot\core.py", line 2238, in get
File "librespot\core.py", line 2258, in get_token
File "librespot\mercury.py", line 183, in send_sync_json
File "librespot\mercury.py", line 171, in send_sync
File "librespot\mercury.py", line 158, in send
File "librespot\core.py", line 1263, in send
File "librespot\core.py", line 1355, in __send_unchecked
File "librespot\crypto.py", line 45, in send_encoded
File "librespot\core.py", line 1875, in flush
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host

[2024-05-17 11:07:45,252 :: worker.downloader.SESSION_DL_TH-8ae3d03c-c7f2-4f64-a4e9-1e2ab4082754 :: worker\downloader.py -> 384: run() :: ERROR] -> Download process returned false: 0acFgroSAvBRgbfazTuwdF
[2024-05-17 11:07:45,252 :: worker.downloader.SESSION_DL_TH-8ae3d03c-c7f2-4f64-a4e9-1e2ab4082754 :: worker\downloader.py -> 340: run() :: INFO] -> Processing download for track by id '0acFgroSAvBRgbfazTuwdF', Attempt: 1/3
[2024-05-17 11:07:45,254 :: worker.downloader.SESSION_DL_TH-8ae3d03c-c7f2-4f64-a4e9-1e2ab4082754 :: worker\downloader.py -> 97: download_track() :: ERROR] -> Metadata fetching failed for track by id '0acFgroSAvBRgbfazTuwdF', Traceback (most recent call last):
File "worker\downloader.py", line 52, in download_track
File "utils\spotify.py", line 278, in get_song_info
File "librespot\core.py", line 2238, in get
File "librespot\core.py", line 2258, in get_token
File "librespot\mercury.py", line 183, in send_sync_json
File "librespot\mercury.py", line 171, in send_sync
File "librespot\mercury.py", line 158, in send
File "librespot\core.py", line 1263, in send
File "librespot\core.py", line 1355, in __send_unchecked
File "librespot\crypto.py", line 45, in send_encoded
File "librespot\core.py", line 1875, in flush
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host

[2024-05-17 11:07:45,255 :: worker.downloader.SESSION_DL_TH-8ae3d03c-c7f2-4f64-a4e9-1e2ab4082754 :: worker\downloader.py -> 384: run() :: ERROR] -> Download process returned false: 0acFgroSAvBRgbfazTuwdF
[2024-05-17 11:07:45,256 :: worker.downloader.SESSION_DL_TH-8ae3d03c-c7f2-4f64-a4e9-1e2ab4082754 :: worker\downloader.py -> 340: run() :: INFO] -> Processing download for track by id '0acFgroSAvBRgbfazTuwdF', Attempt: 2/3
[2024-05-17 11:07:45,259 :: worker.downloader.SESSION_DL_TH-8ae3d03c-c7f2-4f64-a4e9-1e2ab4082754 :: worker\downloader.py -> 97: download_track() :: ERROR] -> Metadata fetching failed for track by id '0acFgroSAvBRgbfazTuwdF', Traceback (most recent call last):
File "worker\downloader.py", line 52, in download_track
File "utils\spotify.py", line 278, in get_song_info
File "librespot\core.py", line 2238, in get
File "librespot\core.py", line 2258, in get_token
File "librespot\mercury.py", line 183, in send_sync_json
File "librespot\mercury.py", line 171, in send_sync
File "librespot\mercury.py", line 158, in send
File "librespot\core.py", line 1263, in send
File "librespot\core.py", line 1355, in __send_unchecked
File "librespot\crypto.py", line 45, in send_encoded
File "librespot\core.py", line 1875, in flush
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host

[2024-05-17 11:07:45,260 :: worker.downloader.SESSION_DL_TH-8ae3d03c-c7f2-4f64-a4e9-1e2ab4082754 :: worker\downloader.py -> 384: run() :: ERROR] -> Download process returned false: 0acFgroSAvBRgbfazTuwdF
[2024-05-17 11:07:48,856 :: worker.utility :: worker\utility.py -> 26: run() :: INFO] -> Playlist m3u8 checking ID 20W9Oh5kOMiTT6TZckEREb
[2024-05-17 11:07:48,856 :: worker.utility :: worker\utility.py -> 52: run() :: INFO] -> Playlist 20W9Oh5kOMiTT6TZckEREb has some items left to download`

Originally created by @Singoleth on GitHub (May 17, 2024). Original GitHub issue: https://github.com/casualsnek/onthespot/issues/122 When downloading long playlists with more than 100 tracks (example: https://open.spotify.com/playlist/20W9Oh5kOMiTT6TZckEREb?si=7b1901b557df42ea), I recently get errors. The code is below. Can anybody help? ![image](https://github.com/casualsnek/onthespot/assets/161520016/22f949be-b57d-44e4-bc16-19c15977984a) ![2024-05-17 11_40_32-casualOnTheSpot](https://github.com/casualsnek/onthespot/assets/161520016/57071a25-3e63-454d-9274-c6881e2bc4b8) `[2024-05-17 11:07:40,248 :: worker.downloader.SESSION_DL_TH-8ae3d03c-c7f2-4f64-a4e9-1e2ab4082754 :: worker\downloader.py -> 384: run() :: ERROR] -> Download process returned false: 3YfsavPFMqogkh9Ph4Ed5n [2024-05-17 11:07:40,852 :: worker.utility :: worker\utility.py -> 26: run() :: INFO] -> Playlist m3u8 checking ID 20W9Oh5kOMiTT6TZckEREb [2024-05-17 11:07:40,852 :: worker.utility :: worker\utility.py -> 52: run() :: INFO] -> Playlist 20W9Oh5kOMiTT6TZckEREb has some items left to download [2024-05-17 11:07:44,854 :: worker.utility :: worker\utility.py -> 26: run() :: INFO] -> Playlist m3u8 checking ID 20W9Oh5kOMiTT6TZckEREb [2024-05-17 11:07:44,855 :: worker.utility :: worker\utility.py -> 52: run() :: INFO] -> Playlist 20W9Oh5kOMiTT6TZckEREb has some items left to download [2024-05-17 11:07:45,249 :: worker.downloader.SESSION_DL_TH-8ae3d03c-c7f2-4f64-a4e9-1e2ab4082754 :: worker\downloader.py -> 340: run() :: INFO] -> Processing download for track by id '0acFgroSAvBRgbfazTuwdF', Attempt: 0/3 [2024-05-17 11:07:45,251 :: worker.downloader.SESSION_DL_TH-8ae3d03c-c7f2-4f64-a4e9-1e2ab4082754 :: worker\downloader.py -> 97: download_track() :: ERROR] -> Metadata fetching failed for track by id '0acFgroSAvBRgbfazTuwdF', Traceback (most recent call last): File "worker\downloader.py", line 52, in download_track File "utils\spotify.py", line 278, in get_song_info File "librespot\core.py", line 2238, in get File "librespot\core.py", line 2258, in get_token File "librespot\mercury.py", line 183, in send_sync_json File "librespot\mercury.py", line 171, in send_sync File "librespot\mercury.py", line 158, in send File "librespot\core.py", line 1263, in send File "librespot\core.py", line 1355, in __send_unchecked File "librespot\crypto.py", line 45, in send_encoded File "librespot\core.py", line 1875, in flush ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host [2024-05-17 11:07:45,252 :: worker.downloader.SESSION_DL_TH-8ae3d03c-c7f2-4f64-a4e9-1e2ab4082754 :: worker\downloader.py -> 384: run() :: ERROR] -> Download process returned false: 0acFgroSAvBRgbfazTuwdF [2024-05-17 11:07:45,252 :: worker.downloader.SESSION_DL_TH-8ae3d03c-c7f2-4f64-a4e9-1e2ab4082754 :: worker\downloader.py -> 340: run() :: INFO] -> Processing download for track by id '0acFgroSAvBRgbfazTuwdF', Attempt: 1/3 [2024-05-17 11:07:45,254 :: worker.downloader.SESSION_DL_TH-8ae3d03c-c7f2-4f64-a4e9-1e2ab4082754 :: worker\downloader.py -> 97: download_track() :: ERROR] -> Metadata fetching failed for track by id '0acFgroSAvBRgbfazTuwdF', Traceback (most recent call last): File "worker\downloader.py", line 52, in download_track File "utils\spotify.py", line 278, in get_song_info File "librespot\core.py", line 2238, in get File "librespot\core.py", line 2258, in get_token File "librespot\mercury.py", line 183, in send_sync_json File "librespot\mercury.py", line 171, in send_sync File "librespot\mercury.py", line 158, in send File "librespot\core.py", line 1263, in send File "librespot\core.py", line 1355, in __send_unchecked File "librespot\crypto.py", line 45, in send_encoded File "librespot\core.py", line 1875, in flush ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host [2024-05-17 11:07:45,255 :: worker.downloader.SESSION_DL_TH-8ae3d03c-c7f2-4f64-a4e9-1e2ab4082754 :: worker\downloader.py -> 384: run() :: ERROR] -> Download process returned false: 0acFgroSAvBRgbfazTuwdF [2024-05-17 11:07:45,256 :: worker.downloader.SESSION_DL_TH-8ae3d03c-c7f2-4f64-a4e9-1e2ab4082754 :: worker\downloader.py -> 340: run() :: INFO] -> Processing download for track by id '0acFgroSAvBRgbfazTuwdF', Attempt: 2/3 [2024-05-17 11:07:45,259 :: worker.downloader.SESSION_DL_TH-8ae3d03c-c7f2-4f64-a4e9-1e2ab4082754 :: worker\downloader.py -> 97: download_track() :: ERROR] -> Metadata fetching failed for track by id '0acFgroSAvBRgbfazTuwdF', Traceback (most recent call last): File "worker\downloader.py", line 52, in download_track File "utils\spotify.py", line 278, in get_song_info File "librespot\core.py", line 2238, in get File "librespot\core.py", line 2258, in get_token File "librespot\mercury.py", line 183, in send_sync_json File "librespot\mercury.py", line 171, in send_sync File "librespot\mercury.py", line 158, in send File "librespot\core.py", line 1263, in send File "librespot\core.py", line 1355, in __send_unchecked File "librespot\crypto.py", line 45, in send_encoded File "librespot\core.py", line 1875, in flush ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host [2024-05-17 11:07:45,260 :: worker.downloader.SESSION_DL_TH-8ae3d03c-c7f2-4f64-a4e9-1e2ab4082754 :: worker\downloader.py -> 384: run() :: ERROR] -> Download process returned false: 0acFgroSAvBRgbfazTuwdF [2024-05-17 11:07:48,856 :: worker.utility :: worker\utility.py -> 26: run() :: INFO] -> Playlist m3u8 checking ID 20W9Oh5kOMiTT6TZckEREb [2024-05-17 11:07:48,856 :: worker.utility :: worker\utility.py -> 52: run() :: INFO] -> Playlist 20W9Oh5kOMiTT6TZckEREb has some items left to download`
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/onthespot#93
No description provided.