title: How to find out if a playlist has a playlist image cover in Spotipy?
body: <p>As title says, im trying to see how if a playlist has a playlist image cover so that it doesn't try to load one that doesnt exist.</p>
  <p>Here is my method:</p>
  <pre><code> currentPlaylist = spotifyObject.user_playlist(username, playlistManageURI)
       
          if ['images'][0] in currentPlaylist:
              playlistCover_url = currentPlaylist['images'][0]['url']
              image = QImage()
              image.loadFromData(requests.get(playlistCover_url).content)
              self.playlistCover.setScaledContents(True)
              self.playlistCover.setPixmap(QPixmap(image))
          else:
              print('Playlist Cover doesnt exist!')
  
  </code></pre>
  <p>which while if a playlist that does have an image cover does load, if i try to load one with an image cover that doesnt exist, it gives me</p>
  <pre><code>IndexError: list index out of range
  </code></pre>
  <p>here is how currentPlaylist looks like with a playlist that does have a cover</p>
  <pre><code>{
      &quot;collaborative&quot;: false,
      &quot;description&quot;: &quot;&quot;,
      &quot;external_urls&quot;: {
          &quot;spotify&quot;: &quot;https://open.spotify.com/playlist/xxxxxxxx&quot;
      },
      &quot;followers&quot;: {
          &quot;href&quot;: null,
          &quot;total&quot;: 4
      },
      &quot;href&quot;: &quot;https://api.spotify.com/v1/playlists/xxxxxxxx?additional_types=track&quot;,
      &quot;id&quot;: &quot;xxxxxx&quot;,
      &quot;images&quot;: [
          {
              &quot;height&quot;: null,
              &quot;url&quot;: &quot;https://i.scdn.co/image/ab67706c0000bebbcab54ad44bbf6dd124838df1&quot;,
              &quot;width&quot;: null
          }
      ],
      &quot;name&quot;: &quot;xxxxx&quot;,
      &quot;owner&quot;: {
          &quot;display_name&quot;: &quot;xxxxx&quot;,
          &quot;external_urls&quot;: {
              &quot;spotify&quot;: &quot;https://open.spotify.com/user/xxxxxxxx&quot;
          },
          &quot;href&quot;: &quot;https://api.spotify.com/v1/users/xxxx&quot;,
          &quot;id&quot;: &quot;xxxxx&quot;,
          &quot;type&quot;: &quot;user&quot;,
          &quot;uri&quot;: &quot;spotify:user:xxxx&quot;
  </code></pre>
  <p>and this is how it looks like without a cover (total blank playlist)</p>
  <pre><code>{
      &quot;collaborative&quot;: false,
      &quot;description&quot;: &quot;xxxx&quot;,
      &quot;external_urls&quot;: {
          &quot;spotify&quot;: &quot;https://open.spotify.com/playlist/xxxxxx&quot;
      },
      &quot;followers&quot;: {
          &quot;href&quot;: null,
          &quot;total&quot;: 0
      },
      &quot;href&quot;: &quot;https://api.spotify.com/v1/playlists/xxxxxx?additional_types=track&quot;,
      &quot;id&quot;: &quot;xxxxxx&quot;,
      &quot;images&quot;: [],
      &quot;name&quot;: &quot;xxxxxx&quot;,
      &quot;owner&quot;: {
          &quot;display_name&quot;: &quot;xxxxx&quot;,
          &quot;external_urls&quot;: {
              &quot;spotify&quot;: &quot;https://open.spotify.com/user/xxxxx&quot;
          },
          &quot;href&quot;: &quot;https://api.spotify.com/v1/users/xxxx&quot;,
          &quot;id&quot;: &quot;xxxxxxxx&quot;,
          &quot;type&quot;: &quot;user&quot;,
          &quot;uri&quot;: &quot;xxxxxxx&quot;
  </code></pre>