You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am cursed with URIs with % escape codes in them. If one comes through with an invalid escape code (e.g., %F rather than %2F) rdflib crashes with a message AttributeError: 'SinkParser' object has no attribute 'line'.
I'm not able to install the github code to check if this is still a problem (I'm using rdflib 4.2.2 via python3) but a scan of notation.n3 suggests that this is an condition that ought to generate a BadSyntax error?
eg: doi:10.1257%2Fjep.27.1.223 accidentally written as doi:10.1257%2jep.27.1.223
The text was updated successfully, but these errors were encountered:
Good catch. Looks like a typo. Sinkparser has a self.lines attribute but the call to BadSyntax here is referencing self.line and causing the AttributeError.
A simple check does the trick:
index ea26ca9d..f3fb905d 100755
--- a/rdflib/plugins/parsers/notation3.py+++ b/rdflib/plugins/parsers/notation3.py@@ -1374,7 +1374,7 @@ class SinkParser:
):
raise BadSyntax(
self._thisDoc,
- self.line,+ self.lines,
argstr,
i,
"illegal hex escape " + c,
and it then properly returns a BadSyntax exception
I am cursed with URIs with % escape codes in them. If one comes through with an invalid escape code (e.g.,
%F
rather than%2F
) rdflib crashes with a messageAttributeError: 'SinkParser' object has no attribute 'line'
.I'm not able to install the github code to check if this is still a problem (I'm using rdflib 4.2.2 via python3) but a scan of notation.n3 suggests that this is an condition that ought to generate a BadSyntax error?
eg:
doi:10.1257%2Fjep.27.1.223
accidentally written asdoi:10.1257%2jep.27.1.223
The text was updated successfully, but these errors were encountered: