AttributeError: 'NoneType' object has no attribute 'some'

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

AttributeError: 'NoneType' object has no attribute 'some'

luke55
Dear Owlready Team,

it might be a basic problem but iam not able to fix it atm and iam new to owl and ontologies.

Trying to rebuild the "pizza_topping logic" on my own server - so i can understand the concept better.
With your path "onto = get_ontology("http://www.lesfleursdunormal.fr/static/_downloads/pizza_onto.owl" everything works fine!

When i use my own server "http://www.XXX.at/public/characterOntology.owl" with exactly the same file i get following error:

AttributeError: 'NoneType' object has no attribute 'some'


What am i missing here? Maybe you can give me some support, i might have to change the source path somewhere...

Kind regards, Lukas
Reply | Threaded
Open this post in threaded view
|

Re: AttributeError: 'NoneType' object has no attribute 'some'

Jiba
Administrator
Hi,

If you want to reproduce exactly the same setting, you need to replace "http://www.lesfleursdunormal.fr/static/_downloads/pizza_onto.owl" by "http://www.XXX.at/public/characterOntology.owl" in the file.

Otherwise, the ontology is named http://www.XXX.at/public/characterOntology.owl BUT the entities it describes are still named "http://www.lesfleursdunormal.fr/static/_downloads/pizza_onto.owl#has_topping", etc.
You you use "onto.has_topping", Owlready adds "#has_topping" at the end of the ontology IRI, leading to http://www.XXX.at/public/characterOntology.owl#has_topping, while the file still defines http://www.lesfleursdunormal.fr/static/_downloads/pizza_onto.owl#has_topping

You can use IRIS["http://www.lesfleursdunormal.fr/static/_downloads/pizza_onto.owl#has_topping"] or namespace if you really want an ontology that describes entities in an other namespace.

Jiba