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
I'm trying to parse yaml file with double curly brace pair ({{ }}). If the file contains a curly brace pair used for example in helm or Go templating, it fails with error yq: Error running jq: TypeError: unhashable type: 'collections.OrderedDict'.
It parses well when double curly braces are inside of string, so for example quoted like "{{ .testVersion }}", but also in case of yaml multi-line strings.
Hi, the unquoted inline scalar with inline double curly braces that you have in your example is not valid YAML, as far as I can tell. Different parsers produce different errors when trying to parse this, and yq could definitely do a better job of informing you that it's invalid, but you guessed correctly that the scalar needs to be quoted. Basically, unquoted { indicates the start of a flow mapping, and this scalar is not a valid flow mapping (and if interpreted as a mapping, wouldn't do what you intended anyway).
Hello,
I'm trying to parse yaml file with double curly brace pair (
{{ }}
). If the file contains a curly brace pair used for example in helm or Go templating, it fails with erroryq: Error running jq: TypeError: unhashable type: 'collections.OrderedDict'
.Here is example file you can try it on.
yq
version is2.12.0
.The text was updated successfully, but these errors were encountered: