spotDL / spotify-downloader

Download your Spotify playlists and songs along with album art and metadata (from YouTube if a match is found).
https://spotdl.readthedocs.io/en/latest/
MIT License
17.14k stars 1.57k forks source link

Spotdl download command getting stuck on 'Processing query' after downloading several songs #2050

Closed avishkarsaha closed 2 months ago

avishkarsaha commented 6 months ago

System OS

Linux

Python Version

3.9 (CPython)

Install Source

pip / PyPi

Install version / commit hash

4.2.4

Expected Behavior vs Actual Behavior

Expected: Expect it to download the MP3, SpotDL file and LRC (if available) Actual: gets stuck on processing query

Steps to reproduce - Ensure to include actual links!

After having downloaded 3000 songs, running a command to download a single track results in the process hanging at processing query. Ran the following command: spotdl download https://open.spotify.com/track/7w5BiU7FKTioZLF9btCx1R --save-file 7w5BiU7FKTioZLF9btCx1R.spotdl --log-level DEBUG

Traceback

[01:12:20 PM] DEBUG    MainThread - Downloader settings: {'audio_providers': ['youtube-music'], 'lyrics_providers': ['genius', 'azlyrics', 'musixmatch', 'synced'], 'playlist_numbering': False, 'scan_for_songs': False, 'm3u': None, 'output': '/home/ubuntu/dataset/30_genres_250k_songs/210k-100k_disjoint/{track-id}.{output-ext}', 'overwrite': 'skip', 'search_query': None, 'ffmpeg': 'ffmpeg', 'bitrate': None, 'ffmpeg_args': None, 'format': 'mp3', 'save_file':           downloader.py:130
                       '7w5BiU7FKTioZLF9btCx1R.spotdl', 'filter_results': True, 'threads': 4, 'cookie_file': None, 'restrict': None, 'print_errors': False, 'sponsor_block': False, 'preload': False, 'archive': None, 'load_config': True, 'log_level': 'DEBUG', 'simple_tui': False, 'fetch_albums': False, 'id3_separator': '/', 'ytm_data': False, 'add_unavailable': False, 'generate_lrc': True, 'force_update_metadata': False, 'only_verified_results': False,                                 
                       'sync_without_deleting': False, 'max_filename_length': None, 'yt_dlp_args': None, 'detect_formats': None, 'save_errors': None, 'ignore_albums': None, 'proxy': None, 'skip_explicit': False, 'log_format': None, 'redownload': False}                                                                                                                                                                                                                                           
[01:12:20 PM] DEBUG    MainThread - FFmpeg path: ffmpeg                                                                                                                                                                                                                                                                                                                                                                                                                               downloader.py:148
[01:12:20 PM] DEBUG    MainThread - Found 0 known songs                                                                                                                                                                                                                                                                                                                                                                                                                               downloader.py:183
[01:12:22 PM] DEBUG    MainThread - Archive: 0 urls                                                                                                                                                                                                                                                                                                                                                                                                                                   downloader.py:230
[01:12:22 PM] DEBUG    MainThread - Downloader initialized                                                                                                                                                                                                                                                                                                                                                                                                                            downloader.py:232
[01:12:22 PM] INFO     MainThread - Processing query: https://open.spotify.com/track/7w5BiU7FKTioZLF9btCx1R                                                                                                                                                                                                                                                                                                                                                                               search.py:132

Other details

This seems to be a very recent issue that started on 22/03/2024, where now after downloading a certain amount of songs the process hangs at the processing query stage. Before that I could download several songs continously without any issue. I'm not sure if some new rate limits have been introduced in the Youtube or Spotify APIs, but something has certainly changed.

jnxr commented 6 months ago

I've also been facing this/similar issue for quite some time now. The thread stalls for whatever reason at random points? There's no real error which shows up in the debug log either. I wanted to make a bugreport, but didn't have any definite info.

Try updating python and all related files. It might help reduce the frequency of such issues. It didn't completely fix it for me.

If anyone has additional info, it would be appreciated.

1oby commented 5 months ago

yes this is the same for me. Did anyone find a way to fix it?

yufikan commented 3 months ago

Same for me. That's weird. It slowed down first significantly. Then got stuck in "Processing". In DEBUG mode it only throws this and doesn't continue from this point on. I downloaded like a thousand song yesterday following the exact steps.

[14:23:31] DEBUG MainThread - Downloader settings: {'audio_providers': ['youtube-music'], 'lyrics_providers': downloader.py:131 ['genius', 'azlyrics', 'musixmatch'], 'playlist_numbering': False, 'scan_for_songs': False, 'm3u':
None, 'output': '{artists} - {title}.{output-ext}', 'overwrite': 'skip', 'search_query': None,
'ffmpeg': 'ffmpeg', 'bitrate': None, 'ffmpeg_args': None, 'format': 'mp3', 'save_file': None,
'filter_results': True, 'album_type': None, 'threads': 4, 'cookie_file': None, 'restrict': None,
'print_errors': False, 'sponsor_block': False, 'preload': False, 'archive': None, 'load_config':
True, 'log_level': 'DEBUG', 'simple_tui': False, 'fetch_albums': False, 'id3_separator': '/',
'ytm_data': False, 'add_unavailable': False, 'generate_lrc': False, 'force_update_metadata': False,
'only_verified_results': False, 'sync_without_deleting': False, 'max_filename_length': None,
'yt_dlp_args': None, 'detect_formats': None, 'save_errors': None, 'ignore_albums': None, 'proxy':
None, 'skip_explicit': False, 'log_format': None, 'redownload': False, 'skip_album_art': False,
'create_skip_file': False, 'respect_skip_file': False}
[14:23:31] DEBUG MainThread - FFmpeg path: ffmpeg downloader.py:149 [14:23:31] DEBUG MainThread - Found 0 known songs downloader.py:184 [14:23:32] DEBUG MainThread - Archive: 0 urls downloader.py:231 [14:23:32] DEBUG MainThread - Downloader initialized downloader.py:233 [14:23:32] INFO MainThread - Processing query: https://open.spotify.com/track/4VQ46sRJtb6osiD3xfYGHx search.py:137

truppelito commented 2 months ago

Same for me! I get the same DEBUG output too:

[13:01:41] DEBUG    MainThread - Downloader settings: {'audio_providers':          downloader.py:114
                    ['youtube-music'], 'lyrics_providers': ['genius', 'azlyrics',                   
                    'musixmatch'], 'playlist_numbering': False, 'scan_for_songs':                   
                    False, 'm3u': None, 'output': '{album}/{title}.{output-ext}',                   
                    'overwrite': 'skip', 'search_query': None, 'ffmpeg': 'ffmpeg',                  
                    'bitrate': None, 'ffmpeg_args': None, 'format': 'mp3',                          
                    'save_file': None, 'filter_results': True, 'threads': 4,                        
                    'cookie_file': None, 'restrict': False, 'print_errors': False,                  
                    'sponsor_block': False, 'preload': False, 'archive': None,                      
                    'load_config': True, 'log_level': 'DEBUG', 'simple_tui':                        
                    False, 'fetch_albums': False, 'id3_separator': '/',                             
                    'ytm_data': False, 'add_unavailable': False, 'geo_bypass':                      
                    False, 'generate_lrc': False, 'force_update_metadata': False}                   
[13:01:41] DEBUG    MainThread - FFmpeg path: ffmpeg                               downloader.py:132
[13:01:41] DEBUG    MainThread - Found 0 known songs                               downloader.py:157
[13:01:43] DEBUG    MainThread - Archive: 0 urls                                                                                                                                                                                        downloader.py:192
[13:01:43] DEBUG    MainThread - Downloader initialized                                                                                                                                                                                 downloader.py:194
[13:01:43] INFO     MainThread - Processing query: https://open.spotify.com/artist/3OKg7YbOIatODzkRIbLJR4                                                                                                                                   search.py:103
DeadLumina commented 2 months ago

Happening to me too, seems to be related in some part to the Spotify API, as when I create a new client_id & client_secret it works again for a bit.

Loudic85 commented 2 months ago

I have created a new app and set in the config file the client_id and client_secret but it seems to not be picked by spotdl... So i have typed in cmd : spotdl web --client-id ........... --client-secret ........... And it works but after this command the realease for web interface rework and the spotdl web without specify the client work... I don't know why... May be a update by one of devs ???

xnetcat commented 2 months ago

follow https://github.com/spotDL/spotify-downloader/issues/2142 for updates