I think you have misunderstand.
Here with change to line 30 done.
Also i made change to
File "...\site-packages\countryinfo\countryinfo.py"This should point to your root python installation,i just use
...\site-packages\countryinfo
to point the file....
should be where your Python 3.7 is installed.Here with change to line 30 done.
C:\Users\Tom λ python Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:06:47) [MSC v.1914 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> from countryinfo import CountryInfo >>> >>> country = CountryInfo('France') >>> country.capital() 'Paris' >>> exit()Now i remove
encoding='utf-8'
from line 30.C:\Users\Tom λ python Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:06:47) [MSC v.1914 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> from countryinfo import CountryInfo >>> >>> country = CountryInfo('France') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\python37\lib\site-packages\countryinfo\countryinfo.py", line 30, in __init__ country_info = json.load(open(file_path)) File "C:\python37\lib\json\__init__.py", line 293, in load return loads(fp.read(), File "C:\python37\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>You see it point to my python installation
File "C:\python37\lib\site-packages\countryinfo\countryinfo.py"
Also i made change to
countryinfo.py
in this location.