Python Forum
Countryinfo package charmap error
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Countryinfo package charmap error
#6
I made changes in countryinfo.py file but no positive result:

SyntaxError: invalid syntax
country = CountryInfo('France')
Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "...\site-packages\countryinfo\countryinfo.py", line 30, in __init__
    country_info = json.load(open(file_path, encoding='utf-8'))
  File "...\Python\Python37\lib\json\__init__.py", line 293, in load
    return loads(fp.read(),
  File "...\Python\Python37\lib\encodings\cp1257.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0xa1 in position 47: character maps to <undefined>
Reply


Messages In This Thread
Countryinfo package charmap error - by mkaru - Sep-14-2018, 09:15 AM
RE: Countryinfo package charmap error - by snippsat - Sep-14-2018, 11:37 AM
RE: Countryinfo package charmap error - by mkaru - Sep-16-2018, 09:00 AM
RE: Countryinfo package charmap error - by snippsat - Sep-16-2018, 10:14 AM
RE: Countryinfo package charmap error - by mkaru - Sep-16-2018, 02:28 PM
RE: Countryinfo package charmap error - by snippsat - Sep-16-2018, 02:58 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  qpython package error Creepy 5 1,215 Apr-19-2024, 10:35 AM
Last Post: masonsbore
  UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 34: character Melcu54 7 19,218 Sep-26-2022, 10:09 AM
Last Post: Melcu54
  countryinfo package error MarcusAurelius 4 2,876 Mar-20-2021, 05:42 PM
Last Post: deanhystad
  error with netcdf4 package damdam 0 1,864 Nov-18-2020, 06:44 PM
Last Post: damdam
  'charmap' codec louis216 4 20,276 Jun-30-2020, 06:25 AM
Last Post: louis216
  Importing module from a package results in import error goghvv 2 2,422 Mar-27-2020, 07:13 PM
Last Post: goghvv
  Beginner - simple package installation error mefeng2008 0 1,746 Mar-13-2020, 09:17 AM
Last Post: mefeng2008
  Error importing package julio2000 3 3,815 Jan-26-2020, 06:15 PM
Last Post: buran
  Error in importing package in pycharm fullstop 0 2,368 Dec-12-2019, 04:03 PM
Last Post: fullstop
  error using geoGen package from GITHUB hknarahari 4 3,301 Sep-17-2019, 06:59 AM
Last Post: buran

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020