nathom / streamrip

A scriptable music downloader for Qobuz, Tidal, SoundCloud, and Deezer
GNU General Public License v3.0
2.65k stars 233 forks source link

[BUG] Error when downloading long playlist from play.qobuz.com #716

Closed j3bx closed 3 months ago

j3bx commented 3 months ago

Describe the bug

Up until song number 165 everything works fine, after that one it crashes

Command Used

rip url https://play.qobuz.com/playlist/14870740

Debug Traceback

╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /home/alan/.local/bin/rip:8 in <module>                                                          │
│                                                                                                  │
│   5 from streamrip.rip import rip                                                                │
│   6 if __name__ == '__main__':                                                                   │
│   7 │   sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])                         │
│ ❱ 8 │   sys.exit(rip())                                                                          │
│   9                                                                                              │
│                                                                                                  │
│ /home/alan/.local/pipx/venvs/streamrip/lib/python3.12/site-packages/click/core.py:1157 in        │
│ __call__                                                                                         │
│                                                                                                  │
│                                     ... 15 frames hidden ...                                     │
│                                                                                                  │
│ /home/alan/.local/pipx/venvs/streamrip/lib/python3.12/site-packages/streamrip/metadata/album.py: │
│ 499 in from_track_resp                                                                           │
│                                                                                                  │
│   496 │   @classmethod                                                                           │
│   497 │   def from_track_resp(cls, resp: dict, source: str) -> AlbumMetadata | None:             │
│   498 │   │   if source == "qobuz":                                                              │
│ ❱ 499 │   │   │   return cls.from_qobuz(resp["album"])                                           │
│   500 │   │   if source == "tidal":                                                              │
│   501 │   │   │   return cls.from_tidal_playlist_track_resp(resp)                                │
│   502 │   │   if source == "soundcloud":                                                         │
│                                                                                                  │
│ /home/alan/.local/pipx/venvs/streamrip/lib/python3.12/site-packages/streamrip/metadata/album.py: │
│ 95 in from_qobuz                                                                                 │
│                                                                                                  │
│    92 │   │   _copyright = resp.get("copyright", "")                                             │
│    93 │   │                                                                                      │
│    94 │   │   if artists := resp.get("artists"):                                                 │
│ ❱  95 │   │   │   albumartist = ", ".join(a["name"] for a in artists)                            │
│    96 │   │   else:                                                                              │
│    97 │   │   │   albumartist = typed(safe_get(resp, "artist", "name"), str)                     │
│    98                                                                                            │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
TypeError: sequence item 0: expected str instance, NoneType found
sys:1: RuntimeWarning: coroutine 'Playlist.download.<locals>._resolve_download' was never awaited

Config File

3  [downloads]
    2  # Folder where tracks are downloaded to
    1  folder = "/home/alan/Music/qobuz/"
    4  # Put Qobuz albums in a 'Qobuz' folder, Tidal albums in 'Tidal' etc.
    1  source_subdirectories = false
    2  # Put tracks in an album with 2 or more discs into a subfolder named `Disc N`
    3  disc_subdirectories = true
    4  # Download (and convert) tracks all at once, instead of sequentially.
    5  # If you are converting the tracks, or have fast internet, this will
    6  # substantially improve processing speed.
    7  concurrency = true
    8  # The maximum number of tracks to download at once
    9  # If you have very fast internet, you will benefit from a higher value,
   10  # A value that is too high for your bandwidth may cause slowdowns
   11  # Set to -1 for no limit
   12  max_connections = 5
   13  # Max number of API requests per source to handle per minute
   14  # Set to -1 for no limit
   15  requests_per_minute = 60
   16
   17  [qobuz]
   18  # 1: 320kbps MP3, 2: 16/44.1, 3: 24/<=96, 4: 24/>=96
   19  quality = 1
   20  # This will download booklet pdfs that are included with some albums
   21  download_booklets = false
   22
   23  # Authenticate to Qobuz using auth token? Value can be true/false only
   24  use_auth_token = true
   25  # Enter your userid if the above use_auth_token is set to true, else enter your email
   26  email_or_userid = "REDACTED"
   27  # Enter your auth token if the above use_auth_token is set to true, else enter the md5 hash of your plaintext pas
   28  password_or_token = "REDACTED"
   29  # Do not change
   30  app_id = "REDACTED"

Operating System

Linux

streamrip version

2.0.5

Screenshots and recordings

No response

Additional context

No response

j3bx commented 3 months ago

Forgot to use verbose, the error is that for some reason Artist appears as none in an specific song, I'm gonna open another issue for that