From 7a9d8f9752568035eecf29214a19af199e9a3772 Mon Sep 17 00:00:00 2001 From: Alok Saboo Date: Fri, 26 May 2023 08:40:15 -0400 Subject: [PATCH] added error handling --- beetsplug/fetchart.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/beetsplug/fetchart.py b/beetsplug/fetchart.py index a29ab6a41..b508a5f66 100644 --- a/beetsplug/fetchart.py +++ b/beetsplug/fetchart.py @@ -956,7 +956,11 @@ class Spotify(RemoteArtSource): return HAS_BEAUTIFUL_SOUP def get(self, album, plugin, paths): - url = self.SPOTIFY_ALBUM_URL + album.items().get().spotify_album_id + try: + url = self.SPOTIFY_ALBUM_URL + album.items().get().spotify_album_id + except AttributeError: + self._log.debug('Fetchart: no Spotify album ID found') + return try: response = requests.get(url) response.raise_for_status()