Invalid URI crashes without BadSyntax error · Issue #821 · RDFLib/rdflib (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

@jameshowison

Description

@jameshowison

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