Solved: changed accidentally Literal(template) into URIRef(template)
Literal(DATA['dv_{}']) works fine.
On Friday, November 12, 2021 at 7:33:27 PM UTC+1 [email protected]
wrote:
> Trace back was
>
> File
> "C:\Users\richa\AppData\Roaming\Python\Python39\site-packages\rdflib\plugins\serializers\turtle.py",
>
> line 336, in path
> or self.p_default(node, position, newline)
> File
> "C:\Users\richa\AppData\Roaming\Python\Python39\site-packages\rdflib\plugins\serializers\turtle.py",
>
> line 343, in p_default
> self.write(self.label(node, position))
> File
> "C:\Users\richa\AppData\Roaming\Python\Python39\site-packages\rdflib\plugins\serializers\turtle.py",
>
> line 359, in label
> return self.getQName(node, position == VERB) or node.n3()
> File
> "C:\Users\richa\AppData\Roaming\Python\Python39\site-packages\rdflib\term.py",
>
> line 268, in n3
> raise Exception(
> Exception: "http://id/sensire/data/dv_{}" does not look like a valid URI,
> I cannot serialize this as N3/Turtle. Perhaps you wanted to urlencode it?
>
>
> On Friday, November 12, 2021 at 5:29:23 PM UTC+1 [email protected]
> wrote:
>
>> I do not understand the following while making RML mappings and thus uri
>> templates.
>>
>> mapping.add(( bnode , RR.template , URIRef("dv3{}") )) works fine when
>> serializing :)
>>
>> while
>> DATA = Namespace('http://data/')
>> DATA["dv3{}"]
>>
>> gives at serialisation:
>> <class 'Exception'> "dv3{}" does not look like a valid URI, I cannot
>> serialize this as N3/Turtle. Perhaps you wanted to urlencode it? :( The
>> { } are not handled properly.
>> But why?
>>
>>
>>
--
http://github.com/RDFLib
---
You received this message because you are subscribed to the Google Groups
"rdflib-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/rdflib-dev/5f3489cc-1ac2-4d5c-b739-9a32357f2baen%40googlegroups.com.