[GH-ISSUE #101] Metadata Failed #72

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

Originally created by @trdahl on GitHub (Oct 25, 2023).
Original GitHub issue: https://github.com/casualsnek/onthespot/issues/101

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'

Originally created by @trdahl on GitHub (Oct 25, 2023). Original GitHub issue: https://github.com/casualsnek/onthespot/issues/101 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'
Author
Owner

@casualsnek commented on GitHub (Oct 28, 2023):

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 ! )

<!-- gh-comment-id:1783716548 --> @casualsnek commented on GitHub (Oct 28, 2023): 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 ! )
Author
Owner

@bulasag commented on GitHub (Nov 10, 2023):

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

<!-- gh-comment-id:1805269702 --> @bulasag commented on GitHub (Nov 10, 2023): 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
Author
Owner

@FatMax1492 commented on GitHub (Aug 25, 2024):

I'm having the same "get metadata failed". First on the release and after following the suggestions here also after building from source. What gives?

<!-- gh-comment-id:2308773955 --> @FatMax1492 commented on GitHub (Aug 25, 2024): I'm having the same "get metadata failed". First on the release and after following the suggestions here also after building from source. What gives?
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#72
No description provided.