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.36k stars 1.6k forks source link

Error tagging musics. #1480

Closed enzomtpYT closed 2 years ago

enzomtpYT commented 2 years ago

System OS

Windows

Python Version

3.9 (CPython)

Install Source

pip / PyPi

Install version / commit hash

3.9.3

Expected Behavior vs Actual Behavior

The music should download and be tagged ! VS The music is downloaded but isn't tagged.

Steps to reproduce

  1. Download python 3.9.10
  2. Download ffmpeg
  3. Add it to path
  4. Download spot dl
  5. Run "spotdl https://open.spotify.com/track/4OvLnqYKXHI8WWfQjpJlMb?"

Traceback

Microsoft Windows [version 10.0.22000.493]
(c) Microsoft Corporation. Tous droits réservés.

D:\Aquila\Desktop\Geoxor>spotdl https://open.spotify.com/track/4OvLnqYKXHI8WWfQjpJlMb?si=6l4hvVwlQheh_15gjcX-oQ
Fetching Song...
Found YouTube URL for "Geoxor - Stardust" : https://www.youtube.com/watch?v=5eu_fkIbmxc

Error: "'albumartist' is not a valid key"       While Error Tagging: Geoxor - Stardust
 Traceback (most recent call last):
  File "E:\Aquila\AppData\Roaming\Python\Python39\site-packages\spotdl\download\downloader.py", line 246, in
download_song
    set_id3_data(
  File "E:\Aquila\AppData\Roaming\Python\Python39\site-packages\spotdl\download\embed_metadata.py", line 301, in
set_id3_data
    function(converted_file_path, song_object)
  File "E:\Aquila\AppData\Roaming\Python\Python39\site-packages\spotdl\download\embed_metadata.py", line 48, in
_set_id3_mp3
    audio_file = _embed_mp3_metadata(audio_file, song_object)
  File "E:\Aquila\AppData\Roaming\Python\Python39\site-packages\spotdl\download\embed_metadata.py", line 133, in
_embed_mp3_metadata
    audio_file["albumartist"] = song_object.album_artists
  File "E:\Aquila\AppData\Roaming\Python\Python39\site-packages\mutagen\easyid3.py", line 212, in __setitem__
    raise EasyID3KeyError("%r is not a valid key" % key)
mutagen.easyid3.EasyID3KeyError: "'albumartist' is not a valid key"

Geoxor - Stardust                        Error Tagging      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸━━  95% 0:00:01

Other details

No response

Silverarmor commented 2 years ago

Cannot reproduce

  1. Force reinstall spotDL pip install -U --force spotdl
  2. You are using python 3.9 (show as python39 in filepath), but you claim to be using 3.10
enzomtpYT commented 2 years ago

Im not claiming to use 3.10 im claiming to use 3.9.10

enzomtpYT commented 2 years ago

pip install -U --force spotdl gave me an error :


Collecting spotdl
  Using cached spotdl-3.9.3-py3-none-any.whl (49 kB)
Collecting beautifulsoup4
  Using cached beautifulsoup4-4.10.0-py3-none-any.whl (97 kB)
Collecting pytube>=11.0.0
  Using cached pytube-12.0.0-py3-none-any.whl (56 kB)
Collecting requests
  Using cached requests-2.27.1-py2.py3-none-any.whl (63 kB)
Collecting Unidecode
  Using cached Unidecode-1.3.4-py3-none-any.whl (235 kB)
Collecting rapidfuzz
  Using cached rapidfuzz-2.0.6-cp39-cp39-win_amd64.whl (1.1 MB)
Collecting spotipy>=2.19.0
  Using cached spotipy-2.19.0-py3-none-any.whl (27 kB)
Collecting ytmusicapi
  Using cached ytmusicapi-0.21.0-py3-none-any.whl (49 kB)
Collecting mutagen
  Using cached mutagen-1.45.1-py3-none-any.whl (218 kB)
Collecting yt-dlp
  Using cached yt_dlp-2022.3.8.2-py3-none-any.whl (2.6 MB)
Collecting rich
  Using cached rich-12.0.0-py3-none-any.whl (224 kB)
Collecting urllib3>=1.26.0
  Using cached urllib3-1.26.8-py2.py3-none-any.whl (138 kB)
Collecting six>=1.15.0
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting certifi>=2017.4.17
  Using cached certifi-2021.10.8-py2.py3-none-any.whl (149 kB)
Collecting idna<4,>=2.5
  Using cached idna-3.3-py3-none-any.whl (61 kB)
Collecting charset-normalizer~=2.0.0
  Using cached charset_normalizer-2.0.12-py3-none-any.whl (39 kB)
Collecting soupsieve>1.2
  Using cached soupsieve-2.3.1-py3-none-any.whl (37 kB)
Collecting jarowinkler<1.1.0,>=1.0.1
  Using cached jarowinkler-1.0.1-cp39-cp39-win_amd64.whl (59 kB)
Collecting pygments<3.0.0,>=2.6.0
  Using cached Pygments-2.11.2-py3-none-any.whl (1.1 MB)
Collecting commonmark<0.10.0,>=0.9.0
  Using cached commonmark-0.9.1-py2.py3-none-any.whl (51 kB)
Collecting websockets
  Using cached websockets-10.2-cp39-cp39-win_amd64.whl (97 kB)
Collecting pycryptodomex
  Using cached pycryptodomex-3.14.1-cp35-abi3-win_amd64.whl (1.8 MB)
Collecting brotli
  Using cached Brotli-1.0.9-cp39-cp39-win_amd64.whl (383 kB)
Installing collected packages: commonmark, certifi, brotli, websockets, urllib3, Unidecode, soupsieve, six, pytube, pygments, pycryptodomex, mutagen, jarowinkler, idna, charset-normalizer, yt-dlp, rich, requests, rapidfuzz, beautifulsoup4, ytmusicapi, spotipy, spotdl
  Attempting uninstall: commonmark
    Found existing installation: commonmark 0.9.1
    Uninstalling commonmark-0.9.1:
      Successfully uninstalled commonmark-0.9.1
  WARNING: The script cmark.exe is installed in 'C:\Program Files\Python39\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  Attempting uninstall: certifi
    Found existing installation: certifi 2021.10.8
    Uninstalling certifi-2021.10.8:
      Successfully uninstalled certifi-2021.10.8
  Attempting uninstall: brotli
    Found existing installation: Brotli 1.0.9
    Uninstalling Brotli-1.0.9:
ERROR: Could not install packages due to an OSError: [WinError 5] Accès refusé: 'e:\\aquila\\appdata\\roaming\\python\\python39\\site-packages\\_brotli.cp39-win_amd64.pyd'
Consider using the `--user` option or check the permissions.
enzomtpYT commented 2 years ago

After deleting "_brotli.cp39-win_amd64.pyd" in "E:\Aquila\AppData\Roaming\Python\Python39\site-packages" the pip install -U --force spotdl worked and now everything works fine thanks !