obophenotype / ncbitaxon

Build for NCBITaxon
BSD 3-Clause "New" or "Revised" License
27 stars 7 forks source link

Latest ncbitaxon version 2024-08-05 cannot be loaded with Pronto #115

Closed Zethson closed 3 months ago

Zethson commented 3 months ago
>>> from pronto import Ontology
>>> Ontology("ncbitaxon.owl")
/home/zeth/miniconda3/envs/lamindb/lib/python3.11/site-packages/pronto/parsers/rdfxml.py:289: SyntaxWarning: <Element '{http://purl.org/dc/terms/}description' at 0x7180502f5c10> contains text but no `xsd:datatype`
  meta.annotations.add(self._extract_literal_pv(child))
/home/zeth/miniconda3/envs/lamindb/lib/python3.11/site-packages/pronto/parsers/rdfxml.py:289: SyntaxWarning: <Element '{http://purl.org/dc/terms/}title' at 0x7180502f5d00> contains text but no `xsd:datatype`
  meta.annotations.add(self._extract_literal_pv(child))
/home/zeth/miniconda3/envs/lamindb/lib/python3.11/site-packages/pronto/parsers/rdfxml.py:289: SyntaxWarning: <Element '{http://www.w3.org/2002/07/owl#}versionInfo' at 0x7180502f5ee0> contains text but no `xsd:datatype`
  meta.annotations.add(self._extract_literal_pv(child))
/home/zeth/miniconda3/envs/lamindb/lib/python3.11/site-packages/pronto/ontology.py:283: NotImplementedWarning: cannot process plain `owl:AnnotationProperty`
  cls(self).parse_from(_handle)  # type: ignore
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/zeth/miniconda3/envs/lamindb/lib/python3.11/site-packages/pronto/ontology.py", line 283, in __init__
    cls(self).parse_from(_handle)  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/zeth/miniconda3/envs/lamindb/lib/python3.11/site-packages/pronto/parsers/rdfxml.py", line 115, in parse_from
    self._extract_annotation_property(prop, curies)
  File "/home/zeth/miniconda3/envs/lamindb/lib/python3.11/site-packages/pronto/parsers/rdfxml.py", line 696, in _extract_annotation_property
    scope = _SYNONYMS.get(elem_scope.attrib[_NS["rdf"]["resource"]])
                          ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '{http://www.w3.org/1999/02/22-rdf-syntax-ns#}resource'
cmungall commented 3 months ago

Made an issue here: