We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When using the inbuilt DCTERMS namespace, from rdflib.namespace import DCTERMS, an error is thrown if the following triple is added to a graph:
from rdflib.namespace import DCTERMS
g.add((r, DCTERMS.format, Literal('application/pdf')))
error: AssertionError: Predicate <built-in method format of Namespace object at 0x10e8e2de0> must be an rdflib term
Presumably there's a Python reserved word 'format' collision somewhere.
Have to do this as a workaround:
g.add((r, URIRef('http://purl.org/dc/terms/format'), Literal('application/pdf')))
The text was updated successfully, but these errors were encountered:
Does DCTERMS['format'] work?
DCTERMS['format']
Sorry, something went wrong.
Oh, I think it does. And, I think I’ve even used it in the past...
Happy to have this issue closed as it’s really, really minor unless someone’s really keen to deal with it for fun.
I'm closing my own issue here as it's very minor and two work-around are given in comments.
No branches or pull requests
When using the inbuilt DCTERMS namespace,
from rdflib.namespace import DCTERMS
, an error is thrown if the following triple is added to a graph:error: AssertionError: Predicate <built-in method format of Namespace object at 0x10e8e2de0> must be an rdflib term
Presumably there's a Python reserved word 'format' collision somewhere.
Have to do this as a workaround:
The text was updated successfully, but these errors were encountered: