Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistency in OntologyManager interfaces #112

Closed
Demirrr opened this issue Nov 22, 2024 · 0 comments
Closed

Inconsistency in OntologyManager interfaces #112

Demirrr opened this issue Nov 22, 2024 · 0 comments
Assignees

Comments

@Demirrr
Copy link
Member

Demirrr commented Nov 22, 2024

from owlapy.owl_ontology_manager import SyncOntologyManager, OntologyManager
o1 = SyncOntologyManager().create_ontology("file:/example_ontology.owl")
for owl_subclass_of_axiom in SyncOntologyManager().load_ontology("KGs/Family/father.owl").get_tbox_axioms():
    o1.add_axiom(owl_subclass_of_axiom)
o1.save(path="demo.owl")

o2=OntologyManager().load_ontology(path="demo.owl")
print(len(o1))

OntologyManager().load_ontology() should work as SyncOntologyManager().load_ontology

Traceback (most recent call last):
  File "/home/cdemir/Desktop/Softwares/owlapy/asd.py", line 24, in <module>
    o2=OntologyManager().load_ontology(path="demo.owl")
  File "/home/cdemir/Desktop/Softwares/owlapy/owlapy/owl_ontology_manager.py", line 94, in load_ontology
    path_iri = IRI.create(path)
  File "/home/cdemir/Desktop/Softwares/owlapy/owlapy/iri.py", line 62, in create
    assert "/" in iri, "Input must contain /"
AssertionError: Input must contain /
Demirrr added a commit that referenced this issue Nov 25, 2024
@Demirrr Demirrr self-assigned this Nov 25, 2024
@Demirrr Demirrr closed this as completed Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant