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 using python 3.5 #6

Open
tomzx opened this issue Aug 21, 2016 · 2 comments
Open

SyntaxError: invalid syntax using python 3.5 #6

tomzx opened this issue Aug 21, 2016 · 2 comments

Comments

@tomzx
Copy link
Contributor

tomzx commented Aug 21, 2016

Hi,

I tried refextract using python 3.5, but it appears not to be compatible due to the fact that python 3.5 does not have raw unicode as they are unicode by default (see http://stackoverflow.com/a/27482285/108301). A suggested fix would be to use the u function from six.

Traceback (most recent call last):
  File "cli.py", line 1, in <module>
    from refextract import extract_references_from_file
  File "C:\Python35\lib\site-packages\refextract\__init__.py", line 28, in <module>
    from .references.api import (
  File "C:\Python35\lib\site-packages\refextract\references\api.py", line 37, in <module>
    from .engine import (get_kbs,
  File "C:\Python35\lib\site-packages\refextract\references\engine.py", line 166
    re_report = re.compile(ur'^(?P<name>[A-Z-]+)(?P<nums>[\d-]+)$', re.UNICODE)

SyntaxError: invalid syntax
@kaplun
Copy link
Contributor

kaplun commented Aug 23, 2016

Hi @tomzx thanks for pointing that out! We are not yet actively targeting Python 3.x in INSPIRE so we haven't yet tackled this aspect. However if meanwhile you wish to send in a PR to fix this particular issue you are more than welcome.

@jacquerie
Copy link
Contributor

Hi @tomzx, thanks a lot for reporting this issue. I see this answers the question I had in #7 (comment).

I fully confirm what @kaplun is saying: we haven't yet began tackling porting INSPIRE to Python 3, so I can't see any of us working on this soon. If you need this you're welcome to submit a PR and we'll merge it ASAP.

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