I tried the button clicks "More > Upload a file > Choose File > Upload file" and it doesn't work.
Hence, I uploaded to my web site. Here is link
http://vehorg.com/external/owlready_question.zip. Feel free to download my ontology file for debugging.
The following is my code snippet to reproduce the problem:
from owlready2 import *
if __name__ == "__main__":
onto_file = "/home/ernest/Downloads/bespoke_travel_ontology.owl"
prefix = "
http://www.vehorg.com/2024/04/bespoke_travel#"
world = World()
world.get_ontology(onto_file).load()
# avoid duplicated ontology
# self.world.set_backend() # owlready2 will automatically update quadstore.
# use inference engine
sync_reasoner_pellet(
world, infer_property_values=True, infer_data_property_values=True
)
for each_global_individual in world.individuals():
print(each_global_individual.name)
print("=" * 60)