creating swrl rules

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

creating swrl rules

CedBere
Dear all,
I followed the documentation to create swrl rules but I have a problem with the class Impl ().

At the line  :
 rule = Imp()

I have an error.
Here is the error message :

----> 7      rule = Impl()

NameError: name 'Impl' is not defined


I do not know if there is an import to do...
Reply | Threaded
Open this post in threaded view
|

Re: creating swrl rules

Jiba
Administrator
Hi,

You need:

from owlready2 import *

Be careful, the name is "Imp", not "Impl" as in" ----> 7      rule = Impl() ".

Jiba
Reply | Threaded
Open this post in threaded view
|

Re: creating swrl rules

CedBere
Thank you for the quick reply!
I corrected, despite that I always have the same mistake.
Attached is a preview
Reply | Threaded
Open this post in threaded view
|

Re: creating swrl rules

CedBere
The problem is solved. It works!

It was actually the Owlready2 version that I had
Indeed I used the version 0.14.
I just uninstall it.
And I just installed the new version 0.19 now, and it works well!

Thank you!