casualsnek / onthespot

qt based music downloader written in python
GNU General Public License v2.0
735 stars 53 forks source link

Metadata Failed #101

Open trdahl opened 8 months ago

trdahl commented 8 months ago

Im getting lot of "get metadata failed", is there a way around this?

Error Message: [2023-10-25 22:19:14,932 :: worker.downloader.SESSION_DL_TH-3b2c0c6d-3794-4797-b677-10c2189975d4 :: C:\onthespot\src\onthespot\worker\downloader.py -> 385: run() :: ERROR] -> Download process returned false: 5Wk8wALd5xMXFyX0qulnz4 [2023-10-25 22:19:14,934 :: worker.downloader.SESSION_DL_TH-3b2c0c6d-3794-4797-b677-10c2189975d4 :: C:\onthespot\src\onthespot\worker\downloader.py -> 341: run() :: INFO] -> Processing download for track by id '5Wk8wALd5xMXFyX0qulnz4', Attempt: 2/3 [2023-10-25 22:19:14,937 :: spotutils :: C:\onthespot\src\onthespot\utils\spotify.py -> 101: sanitize_data() :: INFO] -> Sanitising string: "Dan McKie"; Allow path separators: False [2023-10-25 22:19:14,939 :: spotutils :: C:\onthespot\src\onthespot\utils\spotify.py -> 101: sanitize_data() :: INFO] -> Sanitising string: "Anton Stellz"; Allow path separators: False [2023-10-25 22:19:14,939 :: spotutils :: C:\onthespot\src\onthespot\utils\spotify.py -> 101: sanitize_data() :: INFO] -> Sanitising string: "Physical Systems: Pt. II"; Allow path separators: False [2023-10-25 22:19:14,940 :: spotutils :: C:\onthespot\src\onthespot\utils\spotify.py -> 101: sanitize_data() :: INFO] -> Sanitising string: "Earthquaker"; Allow path separators: False [2023-10-25 22:19:14,941 :: worker.downloader.SESSION_DL_TH-3b2c0c6d-3794-4797-b677-10c2189975d4 :: C:\onthespot\src\onthespot\worker\downloader.py -> 97: download_track() :: ERROR] -> Metadata fetching failed for track by id '5Wk8wALd5xMXFyX0qulnz4', Traceback (most recent call last): File "C:\onthespot\src\onthespot\worker\downloader.py", line 52, in download_track song_info = get_song_info(session, track_id_str) File "C:\onthespot\src\onthespot\utils\spotify.py", line 370, in get_song_info 'label': sanitize_data(album_data['label']), KeyError: 'label'

casualsnek commented 8 months ago

Looks like you are using release version ! Can you try building from source and see if it's fixed ?

( If you don't know how to build or can;t build for any reason, i can share a build from main branch for you ! )

bulasag commented 7 months ago

I was in the same situation as trdahl, using release version and getting "Get metadata failed". I tried building from source and it did get a lot better- about 100 previously failing songs downloaded but there's still 37 left now.

I get these errors when retrying:

[2023-11-10 08:04:17,022 :: runtimedata :: C:\Apps Builds\onthespot\src\onthespot\runtimedata.py -> 49:    handle_exception() :: CRITICAL] -> Uncaught exception
Traceback (most recent call last):
  File "C:\Apps Builds\onthespot\src\onthespot\gui\mainui.py", line 59, in retry_all_failed_downloads
    downloads_status[dl_id]["status_label"].setText("Waiting")
    ~~~~~~~~~~~~~~~~^^^^^^^
KeyError: '5cRyzod3Xe6wbLq9V6G8RT'

Also tried searching for some songs that failed and re-downloading, errors:

[2023-11-10 08:10:14,368 :: runtimedata :: C:\Apps Builds\onthespot\src\onthespot\runtimedata.py -> 49:    handle_exception() :: CRITICAL] -> Uncaught exception
Traceback (most recent call last):
  File "C:\Apps Builds\onthespot\src\onthespot\worker\utility.py", line 220, in run
    song_info = get_song_info(session, item['media_id'])
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Apps Builds\onthespot\src\onthespot\utils\spotify.py", line 343, in get_song_info
    album_url = info['tracks'][0]['album']['href']
                ~~~~^^^^^^^^^^
KeyError: 'tracks'

Edit: Clarification + Tried searching and re-downloading