I have been developing in detail all the small projects found on the Python Crash Course 3d Edition book and on the section Examining GeoJSON Data I am having this error:
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 32173: character maps to
I did it on PyCharm and Geany but it did not work
///I tried this:///
from pathlib import Path
import json
# Read data as a string and convert to a Python object.
path = Path('eq_data/eq_data_1_day_m1.geojson')
contents = path.read_text()
all_eq_data = json.loads(contents)
# Create a more readable version of the data file.
path = Path('eq_data/readable_eq_data.geojson')
readable_contents = json.dumps(all_eq_data, indent=4)
path.write_text(readable_contents)
///And was expecting a new fiel with a more readable format:///