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
Originally posted by sarimarton March 13, 2023
Hey guys,
There's a runtime error occurring in yq, and I can't post an issue because the 'Submit' button is disabled, I don't have time to figure out. I guess you're interested in runtime errors, otherwise sorry for bothering ¯_(ツ)_/¯
Version of yq: 4.31.2
Operating system: mac
Installed via: homebrew
Description:
yq produces a runtime error with a certain input. Please find the cmd line below, note that if date= is a valid past date (e.g. date=2023-03-10'), it works. Obviously with a wrong date the webpage will be out of the desired shape, but it shouldn't (and up until recently didn't) produce a runtime error.
Input command:
curl --silent "https://www.xe.com/currencytables/?from=HUF&date=asdf" \
| sed -n '1h;1!H;${;g;s/<head.*<\/head>//g;p;}' \
| yq -p xml '
(
"EUR|USD"
| split("|")
) as $ccys
| ($ccys | map({ "key": ., "value": null }) | from_entries) as $ccysDefaultMap
| .html.body.div[0].div[1].div[2].section.div[1].div.table as $table
| $table.tbody.tr
' -
It also produces a runtime error if I don't reference a declared variable, no matter of what the input is:
curl --silent "https://www.xe.com/currencytables/?from=HUF&date=2023-03-10" \
| sed -n '1h;1!H;${;g;s/<head.*<\/head>//g;p;}' \
| yq -p xml '
(
"EUR|USD"
| split("|")
) as $ccys
| ($ccys | map({ "key": ., "value": null }) | from_entries) as $ccysDefaultMap
| .html.body.div[0].div[1].div[2].section.div[1].div.table as $table
' -
The text was updated successfully, but these errors were encountered:
mikefarah
changed the title
Runtime error - Can't post issue, so here it is
Runtime error when using variables
Mar 15, 2023
Discussed in #1596
Originally posted by sarimarton March 13, 2023
Hey guys,
There's a runtime error occurring in yq, and I can't post an issue because the 'Submit' button is disabled, I don't have time to figure out. I guess you're interested in runtime errors, otherwise sorry for bothering ¯_(ツ)_/¯
So here is the issue:
Describe the bug
Version of yq: 4.31.2
Operating system: mac
Installed via: homebrew
Description:
yq produces a runtime error with a certain input. Please find the cmd line below, note that if
date=
is a valid past date (e.g.date=2023-03-10
'), it works. Obviously with a wrong date the webpage will be out of the desired shape, but it shouldn't (and up until recently didn't) produce a runtime error.Input command:
It also produces a runtime error if I don't reference a declared variable, no matter of what the input is:
The text was updated successfully, but these errors were encountered: