You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
same error here on python 3.7.3 installing the lib from pip
runfile('C:/Users/vincenzo/.spyder-py3/temp.py', wdir='C:/Users/vincenzo/.spyder-py3')
Traceback (most recent call last):
File "C:\Users\vincenzo\.spyder-py3\temp.py", line 11, in <module>
country = CountryInfo('Italy')
File "C:\Users\vincenzo\Miniconda3\lib\site-packages\countryinfo\countryinfo.py", line 30, in __init__
country_info = json.load(open(file_path))
File "C:\Users\vincenzo\Miniconda3\lib\json\__init__.py", line 293, in load
return loads(fp.read(),
File "C:\Users\vincenzo\Miniconda3\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 49: character maps to <undefined>
I get the error in the title when calling
x = CountryInfo()
I'm able to fix this by adding
'rb'
to theopen()
statement that reads the country json files.The text was updated successfully, but these errors were encountered: