-
Notifications
You must be signed in to change notification settings - Fork 556
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for #1873 avoid AttributeError raised ... #2013
Conversation
from attempting to access language and datatype attributes of non-Literal objects
Just a note for posterity's sake, this patch works because it prevents an AttributeError from occuring, and instead a SPARQLError occurs later, specifically here: rdflib/rdflib/plugins/sparql/operators.py Line 307 in 8d468dd
The SPARQLError that occurs later is correctly handled as per the standard here: rdflib/rdflib/plugins/sparql/evaluate.py Lines 95 to 109 in 8d468dd
|
Will merge this with only one review by tonight if there is no further feedback. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
from attempting to access language and datatype attributes of non-Literal objects
Fix for #1873 ...
Summary of changes
Added
isinstance
check to avoid AttributeErrors being raised by attempting to accesslanguage
anddatatype
attribs of non-Literal objects being passed back up the call stack resulting from SPARQL BIND failures/errors.Checklist
so maintainers can fix minor issues and keep your PR up to date.