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

Multiple disks issue on windows and latest rdflib release. #558

Closed
urbanmatthias opened this issue Jan 12, 2021 · 4 comments · Fixed by #588
Closed

Multiple disks issue on windows and latest rdflib release. #558

urbanmatthias opened this issue Jan 12, 2021 · 4 comments · Fixed by #588
Assignees

Comments

@urbanmatthias
Copy link
Member

In rdflib, they use urllib to parse file paths. In the latest release 5.0 from April 2020 they strip off the drive letter on windows machines with multiple drives: See RDFLib/rdflib#1172 (comment)
The reason for this is the use of urldecode, which confuses the drive letter with a protocol like http://

Currently the user must have the corresponding fix of rdflib installed, which is unlikely since it is not part of the latest release.

Proposed solutions:

If possible, the second is the preferred option

@pablo-de-andres
Copy link
Member

I just ran into this issue again with @eich-2020 on his windows machine
He is using the latest OSP-core (v3.5.5) with rdflib v5.0.0. We attempted to upgrade rdflib, but OSP-core now has a constraint that it should be lower than v6, so that is not an option

@kysrpex
Copy link
Contributor

kysrpex commented Aug 9, 2021

I just ran into this issue again with @eich-2020 on his windows machine
He is using the latest OSP-core (v3.5.5) with rdflib v5.0.0. We attempted to upgrade rdflib, but OSP-core now has a constraint that it should be lower than v6, so that is not an option

For reference, I paste the traceback here.

INFO 2021-08-02 12:11:47,533 [osp.core.ontology.installation]: Will install the following namespaces: ['emmo']
INFO 2021-08-02 12:11:47,539 [osp.core.ontology.namespace_registry]: Loading namespaces emmo, http://emmo.info/emmo#.
ERROR 2021-08-02 12:11:47,865 [osp.core.pico]: An Exception occurred during installation.
Traceback (most recent call last):
  File "C:\Anaconda3\lib\site-packages\osp\core\pico.py", line 65, in install_from_terminal
    ontology_installer.install(args.files)
  File "C:\Anaconda3\lib\site-packages\osp\core\ontology\installation.py", line 35, in install
    self.install(files, self.get_new_packages, False)
  File "C:\Anaconda3\lib\site-packages\osp\core\ontology\installation.py", line 151, in _install
    self.namespace_registry.load_parser(parser)
  File "C:\Anaconda3\lib\site-packages\osp\core\ontology\namespace_registry.py", line 375, in load_parser
    ontology = Ontology(from_parser=parser)
  File "C:\Anaconda3\lib\site-packages\osp\core\ontology\ontology.py", line 120, in __init
    self._ontology_graph = deepcopy(parser.graph)
  File "C:\Anaconda3\lib\site-packages\osp\core\ontology\parser\owl\parser.py", line 87, in graph
    self._graph = self._read_ontology_graph(self._yaml_config,
  File "C:\Anaconda3\lib\site-packages\osp\core\ontology\parser\owl\parser.py", line 209, in _read_ontology_graph
    graph.parse(file_like,
  File "C:\Anaconda3\lib\site-packages\rdflib\graph.py", line 1078, in parse
    parser.parse(source, self, *args)
  File "C:\Anaconda3\lib\site-packages\rdflib\plugins\parsers\rdfxml.py", line 579, in parse
    self._parser.parse(source)
  File "C:\Anaconda3\lib\xml\sax\expatreader.py", line 111, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "C:\Anaconda3\lib\xml\sax\xmlreader.py", line 126, in parse
    buffer = file.read(self._bufsize)
  File "C:\Anaconda3\lib\encodings\cp1252.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 16461: character maps to <undefined>
ERROR 2021-08-02 12:11:47,898 [osp.core.pico]: Consider running 'pico --log-level debug install ...'

@kysrpex
Copy link
Contributor

kysrpex commented Aug 9, 2021

I just ran into this issue again with @eich-2020 on his windows machine
He is using the latest OSP-core (v3.5.5) with rdflib v5.0.0. We attempted to upgrade rdflib, but OSP-core now has a constraint that it should be lower than v6, so that is not an option

This does not look like the same issue to me. More likely it has something to do with the encoding of the ontology file.

@kysrpex
Copy link
Contributor

kysrpex commented Aug 9, 2021

I am closing this and opening a new issue as the issue is unlikely to be related to this one.

EDIT: the new issue.

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