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
This issue happens in the Literal._to_n3 staticmethod, where only a check occurs if the string starts with a quote, but not if it ends with one. As a result, a BadSyntax error results in None to be returned.
...
# Add quotes if necessaryiflen(v) ==0orv[0] notin ['"', "'"]:
v='"'+v+'"'# Create a turtle triple to use the n3 parser# TODO: make the constructor static and use clearstmt=f'@prefix : <{DUMMY_PREFIX}> . @prefix xsd: <{XSD}> . :f a {v} .'g=Graph(bind_namespaces="core")
try:
g.parse(data=stmt, format="turtle")
exceptBadSyntax:
pass
...
The text was updated successfully, but these errors were encountered:
When a Literal string value starts with a quote, but does not end with a quote, the subsequent conversion to rdf fails.
The issue can be repeated by applying this piece code:
This issue happens in the Literal._to_n3 staticmethod, where only a check occurs if the string starts with a quote, but not if it ends with one. As a result, a BadSyntax error results in None to be returned.
The text was updated successfully, but these errors were encountered: