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

Error when installing ontologies (wrong encoding) #684

Closed
kysrpex opened this issue Aug 9, 2021 · 0 comments · Fixed by #697
Closed

Error when installing ontologies (wrong encoding) #684

kysrpex opened this issue Aug 9, 2021 · 0 comments · Fixed by #697
Assignees
Labels
🐛 bug 🖥️ Windows OS Issue specific to the Windows OS. 🔨 simple fix Likely to be solvable in at most a few hours (full-time). 👩‍🎓 newcomer task Issue that is a good entry point to the source code for a newcomer. ⚠️ critical Such issues should be solved as soon as possible, and using a `hotfix branch`.

Comments

@kysrpex
Copy link
Contributor

kysrpex commented Aug 9, 2021

From a comment on issue #558:

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

The traceback is the following (produced when running pico install on this file.

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 kysrpex added 🐛 bug 🖥️ Windows OS Issue specific to the Windows OS. labels Aug 9, 2021
@kysrpex kysrpex added the 🔨 simple fix Likely to be solvable in at most a few hours (full-time). label Aug 12, 2021
@yoavnash yoavnash added the 👩‍🎓 newcomer task Issue that is a good entry point to the source code for a newcomer. label Aug 12, 2021
@kysrpex kysrpex added the ⚠️ critical Such issues should be solved as soon as possible, and using a `hotfix branch`. label Aug 25, 2021
@kysrpex kysrpex self-assigned this Aug 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug 🖥️ Windows OS Issue specific to the Windows OS. 🔨 simple fix Likely to be solvable in at most a few hours (full-time). 👩‍🎓 newcomer task Issue that is a good entry point to the source code for a newcomer. ⚠️ critical Such issues should be solved as soon as possible, and using a `hotfix branch`.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants