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

ModuleNotFoundError: No module named 'rdflib.plugins.parsers.pyRdfa' for RDFLib v5.0.0 #131

Closed
tonal opened this issue Apr 18, 2020 · 4 comments · Fixed by #133 or #161
Closed

ModuleNotFoundError: No module named 'rdflib.plugins.parsers.pyRdfa' for RDFLib v5.0.0 #131

tonal opened this issue Apr 18, 2020 · 4 comments · Fixed by #133 or #161

Comments

@tonal
Copy link

tonal commented Apr 18, 2020

>>> import extruct
RDFLib Version: 5.0.0
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/user/.pyenv/versions/3.6.10/envs/project/lib/python3.6/site-packages/extruct/__init__.py", line 1, in <module>
    from ._extruct import SYNTAXES, extract
  File "/home/user/.pyenv/versions/3.6.10/envs/project/lib/python3.6/site-packages/extruct/_extruct.py", line 5, in <module>
    from extruct.rdfa import RDFaExtractor
  File "/home/user/.pyenv/versions/3.6.10/envs/project/lib/python3.6/site-packages/extruct/rdfa.py", line 14, in <module>
    from rdflib.plugins.parsers.pyRdfa import pyRdfa as PyRdfa, Options, logger as pyrdfa_logger
ModuleNotFoundError: No module named 'rdflib.plugins.parsers.pyRdfa'
@dnnsthnnr
Copy link

@tonal #132 I had the same issue. Just install the rdflib==4.2.2

@lopuhin
Copy link
Member

lopuhin commented Apr 20, 2020

Thanks for report @dnnsthnnr and @tonal . For now pinning rdflib is indeed the best solution, but we'll check if we can update extruct to work with a newer version as well.

@lopuhin
Copy link
Member

lopuhin commented Apr 20, 2020

from https://rdflib.readthedocs.io/en/stable/upgrade4to5.html

The RDFa and Microdata format RDF parsers were removed from rdflib. There are still other python libraries available to implement these parsers.

And indeed the parsers we use were removed in RDFLib/rdflib#828

So it looks like we won't be able to use a newer rdflib version, short-term solution would be to pin it, and long-term to check these other libraries.

@lopuhin
Copy link
Member

lopuhin commented Apr 20, 2020

This is released in 0.9.0

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

Successfully merging a pull request may close this issue.

3 participants