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: No module named 'pyMicrodata' #574

Closed
dbs opened this issue Jan 10, 2016 · 2 comments
Closed

ImportError: No module named 'pyMicrodata' #574

dbs opened this issue Jan 10, 2016 · 2 comments
Labels
bug Something isn't working parsing Related to a parsing.
Milestone

Comments

@dbs
Copy link
Contributor

dbs commented Jan 10, 2016

Under Python 3, invoking the microdata module can throw an uncaught ImportError exception "No module named 'pyMicrodata'", which is rather unexpected for what should be a common operation.

The following currently reproduces the error from the command line:

rdfpipe -w -i microdata https://ambrose.edu/resources/ambrose-archives

and returns the following traceback:

Traceback (most recent call last):
  File "/lib/python3.4/site-packages/rdflib/plugins/parsers/pyMicrodata/utils.py", line 297, in __init__
    self.location = urlparse.urljoin(self.data.geturl(),self.headers[URIOpener.CONTENT_LOCATION])
AttributeError: 'function' object has no attribute 'urljoin'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/bin/rdfpipe", line 9, in <module>
    load_entry_point('rdflib==4.2.1', 'console_scripts', 'rdfpipe')()
  File "/lib/python3.4/site-packages/rdflib/tools/rdfpipe.py", line 181, in main
    outfile, opts.output_format, ns_bindings)
  File "/lib/python3.4/site-packages/rdflib/tools/rdfpipe.py", line 49, in parse_and_serialize
    graph.parse(fpath, format=use_format, **kws)
  File "/lib/python3.4/site-packages/rdflib/graph.py", line 1468, in parse
    location=location, file=file, data=data, **args)
  File "/lib/python3.4/site-packages/rdflib/graph.py", line 1041, in parse
    parser.parse(source, self, **args)
  File "/lib/python3.4/site-packages/rdflib/plugins/parsers/structureddata.py", line 306, in parse
    vocab_cache=vocab_cache)
  File "/lib/python3.4/site-packages/rdflib/plugins/parsers/structureddata.py", line 252, in _process
    orig_source, graph=graph, rdfOutput=False)
  File "/lib/python3.4/site-packages/rdflib/plugins/parsers/pyMicrodata/__init__.py", line 290, in graph_from_source
    if not rdfOutput : raise e
  File "/lib/python3.4/site-packages/rdflib/plugins/parsers/pyMicrodata/__init__.py", line 262, in graph_from_source
    if not rdfOutput : raise e
  File "/lib/python3.4/site-packages/rdflib/plugins/parsers/pyMicrodata/__init__.py", line 252, in graph_from_source
    input = self._get_input(name)
  File "/lib/python3.4/site-packages/rdflib/plugins/parsers/pyMicrodata/__init__.py", line 204, in _get_input
    url_request = URIOpener(name)
  File "/lib/python3.4/site-packages/rdflib/plugins/parsers/pyMicrodata/utils.py", line 308, in __init__
    from pyMicrodata import MicrodataError
ImportError: No module named 'pyMicrodata'
@joernhees joernhees added bug Something isn't working parsing Related to a parsing. labels Jan 26, 2016
@joernhees joernhees added this to the rdflib 4.2.2 milestone Jan 26, 2016
@dbs
Copy link
Contributor Author

dbs commented Feb 16, 2016

Hmm, I thought that when #578 was merged it would have automatically closed this issue through the semi-magical "Fixes 574" comment but notice now that I missed the "#" in front of the issue number. It was merged into master, and I don't see a 4.2.2 dev branch, so I think this can be closed?

@joernhees
Copy link
Member

master currently is the 4.2.2-dev branch: https://github.com/RDFLib/rdflib/blob/master/rdflib/__init__.py#L48 ...

i'll close this, please reopen if the issue wasn't solved... (can't reproduce)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working parsing Related to a parsing.
Projects
None yet
Development

No branches or pull requests

2 participants