The code:
from owlready import *
print("\n\n")
onto = get_ontology("file:///home/pradip/Desktop/demo.owl").load()
print(onto.object_properties())
Error:
* Owlready * Creating new ontology owl <
http://www.w3.org/2002/07/owl>.
* Owlready * Creating new ontology 22-rdf-syntax-ns <
http://www.w3.org/1999/02/22-rdf-syntax-ns>.
* Owlready * Creating new ontology rdf-schema <
http://www.w3.org/2000/01/rdf-schema>.
* Owlready * Creating new ontology XMLSchema <
http://www.w3.org/2001/XMLSchema>.
* Owlready * Creating new ontology anonymous <
http://anonymous>.
* Owlready * Creating new ontology owlready_ontology <
http://www.lesfleursdunormal.fr/static/_downloads/owlready_ontology.owl>.
* Owlready * ...loading ontology owlready_ontology from /usr/local/lib/python3.4/dist-packages/owlready/owlready_ontology.owl...
* Owlready * Creating new ontology demo <file:///home/pradip/Desktop/demo.owl>.
* Owlready * ...loading ontology demo from /home/pradip/Desktop/demo.owl...
Traceback (most recent call last):
File "/home/pradip/Desktop/owlquery.py", line 6, in <module>
print(onto.object_properties())
File "/usr/local/lib/python3.4/dist-packages/owlready/__init__.py", line 325, in __getattr__
raise AttributeError("Ontology '%s' has not object '%s'!" % (self, attr))
AttributeError: Ontology 'demo' has not object 'object_properties'!