Closed mgberg closed 10 months ago
The code for substitution of parameters of SPARQL-based Constraint Components is: https://github.com/mgberg/pySHACL/blob/a0f5647a0f84f9bd6a57b627071d6dab2a1144e2/pyshacl/helper/sparql_query_helper.py#L122
If the parameter is not a Literal, then param_map[variable].value will raise an AttributeError. Instead, it should just use the string representation of the variable binding like is done here:
param_map[variable].value
AttributeError
https://github.com/mgberg/pySHACL/blob/a0f5647a0f84f9bd6a57b627071d6dab2a1144e2/pyshacl/constraints/constraint_component.py#L309
I'll submit a PR shortly to fix this.
The code for substitution of parameters of SPARQL-based Constraint Components is: https://github.com/mgberg/pySHACL/blob/a0f5647a0f84f9bd6a57b627071d6dab2a1144e2/pyshacl/helper/sparql_query_helper.py#L122
If the parameter is not a Literal, then
param_map[variable].value
will raise anAttributeError
. Instead, it should just use the string representation of the variable binding like is done here:https://github.com/mgberg/pySHACL/blob/a0f5647a0f84f9bd6a57b627071d6dab2a1144e2/pyshacl/constraints/constraint_component.py#L309
I'll submit a PR shortly to fix this.