Skip to content

FuXi example code fails #13

@doriantaylor

Description

@doriantaylor

Tried this:

from FuXi.Horn.HornRules import HornFromN3
rs=HornFromN3('http://www.agfa.com/w3c/euler/rdfs-rules.n3')

Got this:

  File "/usr/local/lib/python2.7/dist-packages/FuXi-1.4.dev-py2.7.egg/FuXi/Rete/RuleStore.py", line 396, in add
    isinstance(obj, (URIRef, Literal)) and obj or obj.identifier))
AttributeError: 'Literal' object has no attribute 'identifier'

(Note, I tried the same with Python 3. This is against the latest rdflib.)

https://github.com/RDFLib/FuXi/blob/master/lib/Rete/RuleStore.py#L396 says:

isinstance(obj, (URIRef, Literal)) and obj or obj.identifier))

I'm not sure where obj.identifier is supposed to come from but it doesn't look like it's anywhere in the source of rdflib.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions