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
@@ cannot parse negative amounts (@@ -%amt results in @@ --123.45 and that is a problem for a parser)
Error:
$ hledger -f demo-eur.csv print
hledger: Error: error: could not parse "--2 345.56 USD @@ --2 456.78 EUR" as an amount
CSV record: "2023-01-25","test3","-2 345.56","USD","-2 456.78","EUR"
the account3 rule is: equity:conversion
the account2 rule is: assets:cash
the amount2 rule is: -%3 %4 @@ -%5 %6
the account1 rule is: expenses:assorted
the amount1 rule is: %3 %4 @@ %5 %6
the amount rule is: %5 %6
the comment rule is: \n%1,%2,%3,%4,%5,%6
the date rule is: %1
the description rule is: DEMO|%2
the parse error is: 1:14:
|
1 | 2 345.56 USD @@ --2 456.78 EUR
| ^
unexpected '@'
expecting end of input, ledger-style lot cost, ledger-style lot date, ledger-style lot note, or valuation expression
you may need to change your amount*, balance*, or currency* rules, or add or change your skip rule
CSV file to replicate the bug. The first 2 lines are imported without issue but third line is troublemaker because it has negative numbers:
@@ cannot parse negative amounts (
@@ -%amt
results in@@ --123.45
and that is a problem for a parser)Error:
CSV file to replicate the bug. The first 2 lines are imported without issue but third line is troublemaker because it has negative numbers:
CSV rules import file:
Even positive numbers could be troublemakers:
The text was updated successfully, but these errors were encountered: