You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When installing an inferred EMMO-onology with osp-corev3.5.2 and this configuration file, I get the following traceback:
root@74b5473bc5ad:/shared/cfd-ontology/application/inferred-ontologies# pico install gmshwrapper.yml
INFO 2021-04-13 10:56:04,465 [osp.core.ontology.installation]: Will install the following namespaces: ['emmo']
INFO 2021-04-13 10:56:04,471 [osp.core.ontology.parser]: Parsing gmshwrapper.yml
INFO 2021-04-13 10:56:04,471 [osp.core.ontology.parser]: Parsing gmshwrapper-inferred.owl
ERROR 2021-04-13 10:56:06,349 [osp.core.pico]: An Exception occurred during installation.
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/osp/core/pico.py", line 63, in install_from_terminal
ontology_installer.install(*args.files)
File "/usr/local/lib/python3.6/site-packages/osp/core/ontology/installation.py", line 34, in install
self._install(files, self._get_new_packages, False)
File "/usr/local/lib/python3.6/site-packages/osp/core/ontology/installation.py", line 149, in _install
parser.parse(file)
File "/usr/local/lib/python3.6/site-packages/osp/core/ontology/parser.py", line 63, in parse
file=f)
File "/usr/local/lib/python3.6/site-packages/osp/core/ontology/parser.py", line 270, in _parse_rdf
self._check_duplicate_labels(iri, identifier)
File "/usr/local/lib/python3.6/site-packages/osp/core/ontology/parser.py", line 378, in _check_duplicate_labels
conflicting_labels[labels[i]] |= {iris[i - 1], iris[i]}
KeyError: ('AbsorbedDose', 'en')
ERROR 2021-04-13 10:56:06,350 [osp.core.pico]: Consider running 'pico --log-level debug install ...'
The error obviously occurs in the _check_duplicate_labels of the osp.core.ontology.parser, even though AbsorbedDose only appears once as skos:prefLabel in the inferred-gmshwrapper.owl.
The error is obviously not related to the global SimPhoNy-graph, since it also appears if no other ontology is installed so far.
See the pico list:
root@74b5473bc5ad:/shared/cfd-ontology/application/inferred-ontologies# pico list
Packages:
Namespaces:
- xml
- rdf
- rdfs
- xsd
- owl
- cuba
While running the same command ("pico install --overwrite gmshwrapper.yml ") in the cli for osp-corev3.5.1, the installation works seamessly.
The text was updated successfully, but these errors were encountered:
Note to self and other developers: this is NOT a duplicate of issue #593.
There indeed a bug in the code that makes it not show the actual traceback that should be shown when there are duplicate labels. I have created pull request #608 to fix this bug.
This does not mean that there are not any items with duplicate labels, just that the wrong error is being thrown. You can try to install the ontology again with the first commit of the pull request to find the offenders. Just clone the OSP-core repository, enter it and git fetch && git checkout 2da6b87 && pip uninstall -y osp-core && pip install ., then you will get the correct traceback listing the offenders.
Fixes a bug that makes OSP-core fail before raising the actual intended exception when duplicate labels are found during the installation of an ontology (see issue #607).
When installing an inferred EMMO-onology with
osp-core
v3.5.2 and this configuration file, I get the following traceback:The error obviously occurs in the
_check_duplicate_labels
of theosp.core.ontology.parser
, even thoughAbsorbedDose
only appears once asskos:prefLabel
in theinferred-gmshwrapper.owl
.The error is obviously not related to the global SimPhoNy-graph, since it also appears if no other ontology is installed so far.
See the pico list:
While running the same command ("
pico install --overwrite gmshwrapper.yml
") in thecli
forosp-core
v3.5.1, the installation works seamessly.The text was updated successfully, but these errors were encountered: