Open lorenh opened 4 years ago
Here's a little more information on this. I actually was able to hack it to sort of work but I had to make a change to the cligj source at line 29 by adding encoding='utf-8' when the geojson file is being opened. I don't consider this a permanent fix however since it required modifying source of a dependent module. But it might give some of you Python experts out there clues as to what I need to try to get this to work properly the "right" way.
-- cligj - features.py --
try:
with click.open_file(feature_like, encoding='utf-8') as src: <=== added encoding
for feature in iter_features(iter(src)):
yield feature
except IOError:
coords = list(coords_from_query(feature_like))
Thanks
One more finding on this... it works when I run it on Linux (Ubuntu under WSL), So it must just be something about Python on Windows.
Thanks for suggestion with the temporal fix, helped me with the same issue!
I can't figure out what I'm doing wrong. I have a LF delimited geojson I'm trying to upload as a source. The GeoJson contains some non-ANSI characters and so is encoded in UTF-8.
The command I am using looks something like this:
tilesets add-source {account} source-name source-file.geojson
I can't figure out how to get the JSON to parse using UTF-8, it seems like it always tries to use cp1252.py.
So I'm getting this error:
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 5413: character maps to undefined
Full stack trace: