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

invalid syntax in BioC #8

Closed
kmurphy902 opened this issue Dec 3, 2018 · 3 comments
Closed

invalid syntax in BioC #8

kmurphy902 opened this issue Dec 3, 2018 · 3 comments

Comments

@kmurphy902
Copy link

Hi,
I am trying to use kindred on MacOSX. I have a successful install but when I try to run import kindred in python 2.7, I get the following error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Python/2.7/site-packages/kindred-2.2.2-py2.7.egg/kindred/__init__.py", line 20, in <module>
    from kindred.loadFunctions import loadDoc,loadDocs,loadDir,iterLoadDataFromBioc
  File "/Library/Python/2.7/site-packages/kindred-2.2.2-py2.7.egg/kindred/loadFunctions.py", line 12, in <module>
    import bioc
  File "/Library/Python/2.7/site-packages/bioc/__init__.py", line 4, in <module>
    from .bioc import BioCCollection, BioCDocument, BioCPassage, BioCSentence, BioCAnnotation, \
  File "/Library/Python/2.7/site-packages/bioc/bioc.py", line 24
    def __init__(self, refid: str, role: str):
                            ^
SyntaxError: invalid syntax

I tried updating BioC but it is at the latest version. Thank you in advance!

@jakelever
Copy link
Owner

Hey, it looks like a recent update to BioC makes it incompatible with Python 2. I've updated Kindred to use an older version while I figure out the best way around this. Try updating to v2.2.3:

 pip install --upgrade kindred

Let me know if you've got any issues.

@kmurphy902
Copy link
Author

Thanks so much for your quick response! Everything is working now.

@jakelever
Copy link
Owner

Great!

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

2 participants