|
Hi,
I have an owl file with a specific taxonomy about Flight Plans published on the internet and my intention is:
1- To use it as a model to be downloaded, putted in RAM memory to be manipulated (like an user filling a Web form with several fields)
2- To save this filled model as another independent owl file with another name.
Ok, I have used the save("TestandoPersistencia") and Python have persisted the file on my disk. When I try to use this persisted file like this:
"onto2 = get_ontology("file:///home/rodriguez/Desktop/Only_Dev_CodigoFonte/TestandoPersistencia")
onto2.load()"
Python answers like this:
"
File "/home/rodriguez/Desktop/Only_Dev_Codigo_Fonte/PlanoDeVoo_SITRAER.py", line 17, in <module> onto2.load()
File "/home/rodriguez/.local/lib/python3.8/site-packages/owlready2/namespace.py", line 913, in load
fileobj = open(f, "rb")
FileNotFoundError: [Errno 2] No such file or directory: '/home/rodriguez/Desktop/Only_Dev_CodigoFonte/TestandoPersistenciaDesespero'"
If I don't use the onto.load(), like this:
"onto2 = get_ontology("file:///home/rodriguez/Desktop/Only_Dev_CodigoFonte/TestandoPersistenciaDesespero")
#onto2.load()
print(list(onto2.classes()))
print(list(onto2.individuals()))
print("&&&&&&&&")
print(onto2.base_iri)"
Python works, but answers there is no Classes or Individuals, but they are all there!!!
"runfile('/home/rodriguez/Desktop/Only_Dev_Codigo_Fonte/PlanoDeVoo_SITRAER.py', wdir='/home/rodriguez/Desktop/Only_Dev_Codigo_Fonte')
[]
[]
&&&&&&&&
file:///home/rodriguez/Desktop/Only_Dev_CodigoFonte/TestandoPersistencia#"
Python shows the file and its IRI bu says it is empty for classes and individuals. If I open the saved ontology with a text editor, the classes and individuals are there...
What is happening?
|