On Oct 5, 2006, at 10:17 PM, Nick Falkner wrote:
Hi,
Welcome.
I'm new to the list but I've searched back to find an answer with no
success. I've just installed rdflib-2.3.2, replacing 2.3.1 with bison
(which wasn't quite working but that's another post) and was getting
the following error:
NameError: global name 'BasicGraphPattern' is not defined
when using the test script found at:
attachment.py
On investigation, the required import statement in rdflib/sparql/
bison/SPARQLEvaluate.py was present but had been commented out.
The required import statement is present in the trunk version. I think the main problem here is that it's been too long since we've cut a new version! I was hoping to cut a new version this weekend, but got side tracked on some other bits. I'll cut 2.3.3 from what's in trunk now ASAP as there are already plenty of bug fixes and features over what's in 2.3.2.
I'm using the following Python version:
Python 2.4.3 Stackless 3.1b3 050929 (#1, May 1 2006, 17:05:32)
[GCC 3.3 20030304 (Apple Computer, Inc. build 1640)] on darwin
and was wondering if there was some subtle reason why the necessary
import had been commented out, given that the code fragment that
causes the problem is located in SPARQLEvaluate.py, namely:
File "/usr/local/lib/python2.4/site-packages/rdflib/sparql/bison/
SPARQLEvaluate.py", line 240, in sparqlPSetup
basicGraphPattern = BasicGraphPattern(patternList)
I have uncommented the line and no longer get the error (although
there are now some other problems to deal with).
Is this a Stackless-ism, an error or am I just missing the obvious
somehow?
It's more likely that rdflib was missing the import in 2.3.2. We'll be taking a cleanup pass through the sparql code soon. Not sure what issues there might be with rdflib on Stackless though... as I'm not sure if anyone has tried it out. Would be interested in knowing how it goes.
Thanks,
Nick.
--
-- Nick Falkner
-- PhD Student
-- Distributed and High Performance Computing Group
-- The University of Adelaide
_______________________________________________
Dev mailing list