Skip to content

KeyError: 'label' #2612

@juneX3

Description

@juneX3

System OS

Linux

Python Version

3.12 (CPython)

Install Source

pip / PyPi

Install version / commit hash

v4.2.11

Expected Behavior vs Actual Behavior

ngl I wanted it to download the album that I put into the terminal, but I keep getting this traceback (most recent call last) error looking thing.

Steps to reproduce - Ensure to include actual links!

  1. spotdl https://open.spotify.com/album/43ikEbHYRbz5Cm33DJDmS5?si=NVHyrY-PTfOhOJ9FbxO9Vg -> into terminal
  2. An error occurred
    ╭──────────────────── Traceback (most recent call last) ────────────────────╮
    │ /home/june/4spotdl/venv/lib/python3.12/site-packages/spotdl/console/entry │
    │ _point.py:160 in entry_point │
    │ │
    │ 157 │ try: │
    │ 158 │ │ # Pick the operation to perform │
    │ 159 │ │ # based on the name and run it! │
    │ ❱ 160 │ │ OPERATIONS[arguments.operation]( │
    │ 161 │ │ │ query=arguments.query, │
    │ 162 │ │ │ downloader=downloader, │
    │ 163 │ │ ) │
    │ │
    │ /home/june/4spotdl/venv/lib/python3.12/site-packages/spotdl/console/downl │
    │ oad.py:25 in download │
    │ │
    │ 22 │ """ │
    │ 23 │ │
    │ 24 │ # Parse the query │
    │ ❱ 25 │ songs = get_simple_songs( │
    │ 26 │ │ query, │
    │ 27 │ │ use_ytm_data=downloader.settings["ytm_data"], │
    │ 28 │ │ playlist_numbering=downloader.settings["playlist_numbering"] │
    │ │
    │ /home/june/4spotdl/venv/lib/python3.12/site-packages/spotdl/utils/search. │
    │ py:266 in get_simple_songs │
    │ │
    │ 263 │ │ elif "open.spotify.com" in request and "playlist" in reques │
    │ 264 │ │ │ lists.append(Playlist.from_url(request, fetch_songs=Fal │
    │ 265 │ │ elif "open.spotify.com" in request and "album" in request: │
    │ ❱ 266 │ │ │ lists.append(Album.from_url(request, fetch_songs=False) │
    │ 267 │ │ elif "open.spotify.com" in request and "artist" in request: │
    │ 268 │ │ │ lists.append(Artist.from_url(request, fetch_songs=False │
    │ 269 │ │ elif "open.spotify.com" in request and "user" in request: │
    │ │
    │ /home/june/4spotdl/venv/lib/python3.12/site-packages/spotdl/types/song.py │
    │ :306 in from_url │
    │ │
    │ 303 │ │ - The SongList object. │
    │ 304 │ │ """ │
    │ 305 │ │ │
    │ ❱ 306 │ │ metadata, songs = cls.get_metadata(url) │
    │ 307 │ │ urls = [song.url for song in songs] │
    │ 308 │ │ │
    │ 309 │ │ if fetch_songs: │
    │ │
    │ /home/june/4spotdl/venv/lib/python3.12/site-packages/spotdl/types/album.p │
    │ y:100 in get_metadata │
    │ │
    │ 97 │ │ │ │ tracks_count=album_metadata["total_tracks"], │
    │ 98 │ │ │ │ song_id=track["id"], │
    │ 99 │ │ │ │ explicit=track["explicit"], │
    │ ❱ 100 │ │ │ │ publisher=album_metadata["label"], │
    │ 101 │ │ │ │ url=track["external_urls"]["spotify"], │
    │ 102 │ │ │ │ cover_url=( │
    │ 103 │ │ │ │ │ max( │
    ╰───────────────────────────────────────────────────────────────────────────╯
    KeyError: 'label'

Traceback

An error occurred                                                            
╭──────────────────── Traceback (most recent call last) ────────────────────╮
│ /home/june/4spotdl/venv/lib/python3.12/site-packages/spotdl/console/entry │
│ _point.py:160 in entry_point                                              │
│                                                                           │
│   157 │   try:                                                            │
│   158 │   │   # Pick the operation to perform                             │
│   159 │   │   # based on the name and run it!                             │
│ ❱ 160 │   │   OPERATIONS[arguments.operation](                            │
│   161 │   │   │   query=arguments.query,                                  │
│   162 │   │   │   downloader=downloader,                                  │
│   163 │   │   )                                                           │
│                                                                           │
│ /home/june/4spotdl/venv/lib/python3.12/site-packages/spotdl/console/downl │
│ oad.py:25 in download                                                     │
│                                                                           │
│   22 │   """                                                              │
│   23 │                                                                    │
│   24 │   # Parse the query                                                │
│ ❱ 25 │   songs = get_simple_songs(                                        │
│   26 │   │   query,                                                       │
│   27 │   │   use_ytm_data=downloader.settings["ytm_data"],                │
│   28 │   │   playlist_numbering=downloader.settings["playlist_numbering"] │
│                                                                           │
│ /home/june/4spotdl/venv/lib/python3.12/site-packages/spotdl/utils/search. │
│ py:266 in get_simple_songs                                                │
│                                                                           │
│   263 │   │   elif "open.spotify.com" in request and "playlist" in reques │
│   264 │   │   │   lists.append(Playlist.from_url(request, fetch_songs=Fal │
│   265 │   │   elif "open.spotify.com" in request and "album" in request:  │
│ ❱ 266 │   │   │   lists.append(Album.from_url(request, fetch_songs=False) │
│   267 │   │   elif "open.spotify.com" in request and "artist" in request: │
│   268 │   │   │   lists.append(Artist.from_url(request, fetch_songs=False │
│   269 │   │   elif "open.spotify.com" in request and "user" in request:   │
│                                                                           │
│ /home/june/4spotdl/venv/lib/python3.12/site-packages/spotdl/types/song.py │
│ :306 in from_url                                                          │
│                                                                           │
│   303 │   │   - The SongList object.                                      │
│   304 │   │   """                                                         │
│   305 │   │                                                               │
│ ❱ 306 │   │   metadata, songs = cls.get_metadata(url)                     │
│   307 │   │   urls = [song.url for song in songs]                         │
│   308 │   │                                                               │
│   309 │   │   if fetch_songs:                                             │
│                                                                           │
│ /home/june/4spotdl/venv/lib/python3.12/site-packages/spotdl/types/album.p │
│ y:100 in get_metadata                                                     │
│                                                                           │
│    97 │   │   │   │   tracks_count=album_metadata["total_tracks"],        │
│    98 │   │   │   │   song_id=track["id"],                                │
│    99 │   │   │   │   explicit=track["explicit"],                         │
│ ❱ 100 │   │   │   │   publisher=album_metadata["label"],                  │
│   101 │   │   │   │   url=track["external_urls"]["spotify"],              │
│   102 │   │   │   │   cover_url=(                                         │
│   103 │   │   │   │   │   max(                                            │
╰───────────────────────────────────────────────────────────────────────────╯
KeyError: 'label'

Other details

idk what else to do!! I've tried downgrading, ffmpeg is installed, and sometimes i get: for a different album. Im tired!!

Found 11 songs in Mindstreaming, Vol. 1 (Album)
KeyError: 'genres'
KeyError: 'genres'
KeyError: 'genres'
KeyError: 'genres'
KeyError: 'genres'
KeyError: 'genres'
KeyError: 'genres'
KeyError: 'genres'
KeyError: 'genres'
KeyError: 'genres'
KeyError: 'genres'

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugUnexpected problem or unintended behavior that needs to be fixed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions