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
If elem.find returns None it fails as the test is against the .text value not the return from find, ie:
/usr/local/lib/python3.8/dist-packages/pronto/parsers/rdfxml.py in parse_from(self, handle, threads)
113 self._extract_object_property(prop, curies)
114 for prop in tree.iterfind(_NS["owl"]["AnnotationProperty"]):
--> 115 self._extract_annotation_property(prop, curies)
116 for class_ in tree.iterfind(_NS["owl"]["Class"]):
117 self._extract_term(class_, curies)
/usr/local/lib/python3.8/dist-packages/pronto/parsers/rdfxml.py in _extract_annotation_property(self, elem, curies)
666 if resource == _NS["oboInOwl"].raw("SynonymTypeProperty"):
667 # extract ID and label of the synonymtypedef
--> 668 label = elem.find(_NS["rdfs"]["label"]).text
669 if label is None:
670 label = ""
AttributeError: 'NoneType' object has no attribute 'text'
If
elem.find
returns None it fails as the test is against the .text value not the return from find, ie:File from:
https://raw.githubusercontent.com/obophenotype/human-phenotype-ontology/master/hp.owl
I have been able to reproduce with a test file that contains:
I fixed it locally by moving the test onto the element returned from find rather than element.text ie
The text was updated successfully, but these errors were encountered: