Can't load an album

I think the problem in this case is that the cover art type “Raw/unedited” is not supported by Picard at all (there’s a ticket for it, though).

Trying to load https://musicbrainz.org/release/95f96fa2-bbcc-4e3f-9f47-9322a8f81906 in a Picard 2 development build on Linux logs the following error:

D: 17:31:10,904 coverart.queue_put:206: Queuing cover art image CaaCoverArtImage(url='http://coverartarchive.org/release/95f96fa2-bbcc-4e3f-9f47-9322a8f81906/20260915655.jpg', types=['front', 'raw/unedited'], is_front=True)
Traceback (most recent call last):
  File "./picard/webservice/__init__.py", line 426, in _process_reply
    self._handle_reply(reply, request)
  File "./picard/webservice/__init__.py", line 415, in _handle_reply
    handler(reply.readAll(), reply, error)
  File "./picard/coverart/providers/caa.py", line 376, in _caa_json_downloaded
    self.next_in_queue()
  File "./picard/coverart/providers/__init__.py", line 151, in next_in_queue
    self.coverart.next_in_queue()
  File "./picard/coverart/__init__.py", line 187, in next_in_queue
    'type': coverartimage.types_as_string(),
  File "./picard/coverart/image.py", line 354, in types_as_string
    types = [translate_caa_type(type) for type in types]
  File "./picard/coverart/image.py", line 354, in <listcomp>
    types = [translate_caa_type(type) for type in types]
  File "./picard/coverart/utils.py", line 42, in translate_caa_type
    return gettext_attr(CAA_TYPES_TR[name], "cover_art_type")
KeyError: 'raw/unedited'

The code starting at 'type': coverartimage.types_as_string(), to the bottom of the stack is already there in Picard 1.4.

Picard 2 just crashes in this case, in Picard 1.4 something’s catching that exception, but doesn’t properly update the album loading state, meaning the album will sit there “loading album information” indefinitely.

6 Likes