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
{{ message }}
Repository navigation
Parsing large numbers with 1e12 notation fail #144
I just ran into the same issue with the following code:
resource "datadog_monitor" "my_monitor" {
name = "test-monitor"
message = "error rate is too high"
type. = "query alert"
query = "(does not matter)"
monitor_thresholds {
warning = 4e-06
critical = 0.01
}
}
And the following error:
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.[12](https://github.mpi-internal.com/bnl/terraform-datadog/actions/runs/8741481/job/27979185?pr=2817#step:6:13).1/x64/lib/python3.12/site-packages/lark/parsers/lalr_parser_state.py", line 77, in feed_token
action, arg = states[state][token.type]
~~~~~~~~~~~~~^^^^^^^^^^^^
KeyError: 'NAME'
During handling of the above exception, another exception occurred:
... (rest of the stack trace left out for brevity)
File "/opt/hostedtoolcache/Python/3.12.1/x64/lib/python3.12/site-packages/lark/parsers/lalr_parser_state.py", line 80, in feed_token
raise UnexpectedToken(token, expected, state=self, interactive_parser=None)
lark.exceptions.UnexpectedToken: Unexpected token Token('NAME', 'critical') at line 58, column 5.
Expected one of:
* LBRACE
Applying the following change fixed the error:
- warning = 4e-06+ warning = 0.000004
We are using python-hcl2==5.1.1 and lark==1.2.2. Since this is an exception with Lark, I think that we should report this issue to Lark.
Activity
baer95 commentedon Jan 9, 2025
I just ran into the same issue with the following code:
And the following error:
Applying the following change fixed the error:
We are using
python-hcl2==5.1.1andlark==1.2.2. Since this is an exception with Lark, I think that we should report this issue to Lark.v6.1.0 release (#187)