-
Notifications
You must be signed in to change notification settings - Fork 12
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
Comments
I just ran into this issue again with @eich-2020 on his windows machine |
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 ...' |
This does not look like the same issue to me. More likely it has something to do with the encoding of the ontology file. |
I am closing this and opening a new issue as the issue is unlikely to be related to this one. EDIT: the new issue. |
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
The text was updated successfully, but these errors were encountered: