-
Issue rdflib.plugins.stores SPARQLStore returns exception when query the fuseki running in a local docker, the code never be changed and this issue starts to happen recently. Versions
code
Error Traceback (most recent call last):
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The error suggests that your issue is caused by backwards-incompatible changes in pyparsing 3.0 which you can resolve by reverting to pyparsing 2.4.7 $ pip uninstall pyparsing
$ pip install pyparsing==2.4.7 or, if that's a problem, applying the following patch: diff --git a/rdflib/plugins/sparql/parserutils.py b/rdflib/plugins/sparql/parserutils.py
index 29804eea..24ad6d9b 100644
--- a/rdflib/plugins/sparql/parserutils.py
+++ b/rdflib/plugins/sparql/parserutils.py
@@ -111,9 +111,9 @@ class Param(TokenConverter):
"""
def __init__(self, name, expr, isList=False):
- self.name = name
self.isList = isList
TokenConverter.__init__(self, expr)
+ self.setName(name)
self.addParseAction(self.postParse2)
def postParse2(self, tokenList):
@@ -215,7 +215,7 @@ class Comp(TokenConverter):
def __init__(self, name, expr):
self.expr = expr
TokenConverter.__init__(self, expr)
- self.name = name
+ self.setName(name)
self.evalfn = None
def postParse(self, instring, loc, tokenList):
Although the specific pyparsing version wasn't/isn't pinned in requirements.txt, it probably should have been and that aspect of RDFLib distributions will be now be under consideration. I can't comment on the timescale for a bugfix release of RDFLib 5.0.0, so I'll leave this issue open in case other RDFLib 5 users encounter the same problem. |
Beta Was this translation helpful? Give feedback.
The error suggests that your issue is caused by backwards-incompatible changes in pyparsing 3.0 which you can resolve by reverting to pyparsing 2.4.7
or, if that's a problem, applying the following patch: