berkantaydin / fuxi

Automatically exported from code.google.com/p/fuxi
0 stars 0 forks source link

testUnionSkolemization: KeyError: u'owl' #14

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?

/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Fu
Xi-1.0.dev-py2.6.egg/FuXi/Rete/AlphaNode.py:6: DeprecationWarning: the sets 
module is deprecated
  from sets import Set
Time to build production rule (RDFLib): 9.89437103271e-05 seconds
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Fu
Xi-1.0.dev-py2.6.egg/FuXi/Rete/SidewaysInformationPassing.py:7: 
DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import unittest, os, sys, itertools, md5
E
======================================================================
ERROR: testUnionSkolemization (__main__.UnionSkolemizedTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "testSkolemization.py", line 31, in testUnionSkolemization
    p=network.setupDescriptionLogicProgramming(self.tBoxGraph)
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/FuXi-1.0.dev-py2.6.egg/FuXi/Rete/Network.py", line 352, in setupDescriptionLogicProgramming
    for rule in AdditionalRules(owlN3Graph):
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/FuXi-1.0.dev-py2.6.egg/FuXi/DLP/ConditionalAxioms.py", line 66, in AdditionalRules
    if tBox.query(FUNCTIONAL_PROPERTIES).askAnswer[0]:
  File "build/bdist.macosx-10.3-fat/egg/rdflib/Graph.py", line 738, in query
    extensionFunctions))
  File "build/bdist.macosx-10.3-fat/egg/rdflib/sparql/bison/Processor.py", line 50, in query
    extensionFunctions=extensionFunctions)
  File "build/bdist.macosx-10.3-fat/egg/rdflib/sparql/Algebra.py", line 312, in TopEvaluate
    None)
  File "build/bdist.macosx-10.3-fat/egg/rdflib/sparql/Algebra.py", line 165, in ReduceToAlgebra
    prolog))
  File "build/bdist.macosx-10.3-fat/egg/rdflib/sparql/bison/SPARQLEvaluate.py", line 273, in createSPARQLPConstraint
    for expr in reducedFilter]))
  File "build/bdist.macosx-10.3-fat/egg/rdflib/sparql/bison/SPARQLEvaluate.py", line 186, in mapToOperator
    mapToOperator(expr.right,prolog,combinationArg,constraint=constraint),
  File "build/bdist.macosx-10.3-fat/egg/rdflib/sparql/bison/SPARQLEvaluate.py", line 218, in mapToOperator
    return "'%s'"%convertTerm(expr,prolog)
  File "build/bdist.macosx-10.3-fat/egg/rdflib/sparql/bison/SPARQLEvaluate.py", line 71, in convertTerm
    return URIRef(queryProlog.prefixBindings[term.prefix] + term.localname)
KeyError: u'owl'

----------------------------------------------------------------------
Ran 1 test in 0.170s

Please use labels and text to provide additional information.

Original issue reported on code.google.com by onew...@gmail.com on 1 Jul 2010 at 12:22

GoogleCodeExporter commented 8 years ago
This happens for me on every invocation of setupDescriptionLogicProgramming.

Bisect:

The first bad revision is:
changeset:   18:bab89a0593f2
user:        Chimezie Ogbuji <chimezie@gmail.com>
date:        Thu Dec 17 19:08:08 2009 -0500
summary:     - removed semantics for owl:differentFrom, list handling, owl:IFP, 
owl:FP, owl:oneOf,  (they are now optional)

Original comment by vfaronov on 23 Jul 2010 at 10:09

GoogleCodeExporter commented 8 years ago
The following fix seems to address the immediate issue but others then arise.  
I haven't checked this in yet since I don't have my access to the repository 
working yet.

ConditionalAxioms.py line 66

    if tBox.query(FUNCTIONAL_PROPERTIES,initNs={"owl":"http://www.w3.org/2002/07/owl#"}).askAnswer[0]:   #OSN

Original comment by onew...@gmail.com on 23 Jul 2010 at 11:52

GoogleCodeExporter commented 8 years ago
Provided dictionary with owl reference.

Original comment by onew...@gmail.com on 26 Jul 2010 at 10:05