openvenues / lieu

Dedupe/batch geocode addresses and venues around the world with libpostal
MIT License
82 stars 23 forks source link

SyntaxError: invalid syntax #16

Open raespanha opened 6 years ago

raespanha commented 6 years ago

When trying to run de command dedupe_geojson example1.geojson example2.geojson -o /outputs I'm getting the following error:

_Traceback (most recent call last): File "/usr/local/bin/dedupe_geojson", line 16, in from lieu.address import Address, AddressComponents, Coordinates File "/usr/local/lib/python3.5/dist-packages/lieu/address.py", line 3, in from lieu.coordinates import latlon_to_decimal File "/usr/local/lib/python3.5/dist-packages/lieu/coordinates.py", line 27 latitude_dms_regex = re.compile(ur'^(-?[0-9]{1,2})[ ][ :\xb0\xbad][ ]([0-5]?[0-9])?[ ][:\'\u2032m]?[ ]([0-5]?0-9?)?[ ][:\?\"\u2033s]?[ ](N|n|S|s)?$', re.I | re.UNICODE) ^
SyntaxError: invalid syntax
_

I tried to fix it by replacing the "ur" to "r" in coordinates.py and the next error I get is

_Word index file: deduped/info_gain.index Traceback (most recent call last): File "/usr/local/bin/dedupe_geojson", line 272, in map_file = open(temp_filename, 'w') FileNotFoundError: [Errno 2] No such file or directory: 'deduped/near_dupes'_

I already tried to create the folder and file but the issue persists.

I am using the first examples in documentation in the following format https://data.whosonfirst.org/387/021/307/387021307.geojson

pcrglennon commented 6 years ago

I got the same error (invalid syntax) on a fresh install, using python 3.7. Ended up just switching to 2.7, and that worked for me.

raespanha commented 6 years ago

pcrglennon, thank you for your reply. I'll try that :)

TomLaMantia commented 5 years ago

I got the same error (invalid syntax) on a fresh install, using python 3.7. Ended up just switching to 2.7, and that worked for me.

I had no luck with Python 2.7 unfortunately.