Open arundhati-b opened 2 years ago
Up: I get the same problem. The saving mechanism doesn't work for custom ontologies. Given the error I thought it was a matter of IRI, but I couldn't find any quick fix.
OK, I have a fix actually.
First, make sure your IRI has a protocol, so for instance you'd init with:
onto = owlready2.get_ontology('http://local_ontology.owl')
Then allow it to be saved by bytes writing:
p = 'local.owl'
with open(p, 'wb') as f:
onto.save(f)
Remember however that this here is an unofficial and unmaintained fork, the actual repo is here: https://bitbucket.org/jibalamy/owlready2/src/master/ And official issue board here: http://owlready.306.s1.nabble.com/
This is happening after I try to save an ontology after removing some of its Object Properties. Not sure what the exact cause is and how to fix it.