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

ImportError when using the 1.0 version of PyDelphin #2

Open
jadecxliu opened this issue Oct 12, 2019 · 4 comments
Open

ImportError when using the 1.0 version of PyDelphin #2

jadecxliu opened this issue Oct 12, 2019 · 4 comments

Comments

@jadecxliu
Copy link

Hi,

Thanks for the great work!

I tried to run mrs-to-penman.py with 0.0.2 version of delphin (derived from pip install delphin). However, it caused several import errors as below:

  • from delphin.mrs.components import var_sort:
    ImportError: No module named 'delphin.mrs.components'

  • from delphin.mrs import xmrs, simplemrs, penman, Dmrs:
    ImportError: cannot import name 'xmrs','simplemrs','penman'
    I found delphin.xmrs, delphin.simplemrs and delphin.codecs.dmrspenman to replace the following, but it still doesn't work for Triple = penman.penman.Triple, codec = penman.XMRSCodec(indent=2) and mrs = simplemrs.loads_one(row[mrs_spec]).

It seems that the code has not updated in parallel with the current version of delphin.
Could you update the code or give me some suggestions on transitioning the code to avoid ImportError?
I would also appreciate it if you could provide the corresponding old version delphin.

Thanks.

@goodmami
Copy link
Owner

Hi, thanks for the bug report. I don't have time for a proper fix right now, but let's leave the issue open to remind me.

For now a workaround is to use a previous version of PyDelphin (preferably in a virtual environment):

pip install pydelphin==0.9.2

You also need Penman:

pip install penman==0.6.2

Let me know if you're still having issues.

@goodmami goodmami changed the title ImportError when using 0.0.2 version of Delphin ImportError when using the 1.0 version of PyDelphin Oct 12, 2019
@jadecxliu
Copy link
Author

Thanks for the useful instruction.

@arademaker
Copy link

Only works until Python 3.9.

@goodmami
Copy link
Owner

@arademaker thanks for the context. Python 0.9.2 was only supported through Python 3.7 (which is now the lowest active version of Python).

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