Thanks, but #chosen = artists[i]['name'].replace(" ", "+") already replace spaces for "+" no? With the code below as you said it is appearing the same error:
KeyError: 'album'
for i, v in artists.items(): #chosen = artists[i]['name'].replace(" ", "+") chosen = '+'.join(artists[i]['name'].lower().split()) artist_response = requests.get(f'http://ws.audioscrobbler.com/2.0/?method=artist.getinfo&artist={chosen}&api_key={api_key}&format=json') artist_data = artist_response.json()Error: for album in album_response['album']['tracks']['track']:
KeyError: 'album'