my code is this and when I search for the band diiv
I get this error
I understand that it is the closing character of simple quotes but I do not know how to solve it.
File "C:\Python27\lib\encodings\cp850.py", line 12, in encode
return codecs.charmap_encode(input,errors,encoding_map)
UnicodeEncodeError: 'charmap' codec can't encode character u'\u2019' in position 32: character maps to <undefined>
my code is as follows
import requests
import json
artista = raw_input ("Ingrese el nombre de banda o solista que desea buscar:")
r = requests.get("http://ws.audioscrobbler.com/2.0/?method=artist.gettopalbums&artist="+artista+"&api_key=a31007b9178e35854f9fa22039cb7362&format=json")
musica_dict = json.loads(r.text)
for album in musica_dict['topalbums']['album']:
print(album['name'])