Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SyntaxError: invalid syntax #16

Open
raespanha opened this issue Aug 10, 2018 · 3 comments
Open

SyntaxError: invalid syntax #16

raespanha opened this issue Aug 10, 2018 · 3 comments

Comments

@raespanha
Copy link

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
Copy link

pcrglennon commented Oct 17, 2018

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
Copy link
Author

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

@TomLaMantia
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants