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
A-BUGSomething wrong, confusing or sub-standard in the software, docs, or user experience.csvThe csv file format, csv output format, or generally CSV-related.
$ cat demo-test.csv.rules
# hledger rules
# skip the headings line:
skip 1
# specify the date field's format - not needed here since date is Y/M/D
date-format %Y-%m-%d %H:%M:%S
# since the CSV amounts have no currency symbol, add one:
#currency BNB
fields code, blkid, epoch, date, accfrom, accto, contract, amountin, amountout, value_usd, txfee, txfee_usd, hprice, txstatus, err, method
# DEBUG
#comment \n%1,%2,%3,%4,%5,%6,%7,%8,%9,%10,%11,%12,%13,%14,%15,%16,%17
comment \n%code,%date,%amountin,%amountout,%txfee,%txstatus,%err,%method
description HF|%method
status *
# set the base account that this CSV file corresponds to
account1 expenses:bnb:hf:tx-fee %txfee BNB
account2 assets:bnb:acc1
if %amountin ^0$
amount3 -%amountout BNB
account3 expenses:bnb:hf
if %amountout ^0$
amount3 %amountin BNB
account3 income:bnb:hf
Error during import, the issue:
$ hledger -f demo-test.csv print
hledger: Error: /home/user/demo-test.csv:1-0:
1 | 2022-12-21 * (0x34906d1622d7a8ddf5996d95c55a78c18452bb3dc20d82a74915a584a65d4a8b) HF|Invest
| ; 0x34906d1622d7a8ddf5996d95c55a78c18452bb3dc20d82a74915a584a65d4a8b,2022-12-21 17:23:59,0,0.1,0.00152825,,,Invest
| expenses:bnb:hf:tx-fee 0.00152825 BNB
| assets:bnb:acc1
| expenses:bnb:hf -0.1 BNB
This multi-commodity transaction is unbalanced.
There can't be more than one real posting with no amount.
(Remember to put two or more spaces between account and amount.)
When I create journal file with the same data, hledger processes it without any issue:
File demo.csv.rules was correct and that is why hledger processed file demo.csv without any issue...
This issue could be closed but I keep it open, maybe diagnostic could be improved...
UPDATE: sign in amount3 is wrong, it should be opposite (income should be negative and expense positive). This accounting error can be ignored, it has no impact to this issue..
The text was updated successfully, but these errors were encountered:
PSLLSP
added
the
A-BUG
Something wrong, confusing or sub-standard in the software, docs, or user experience.
label
Jan 8, 2023
One more update, maybe new issue. CSV file cannot be used with hledger-web. I have to use hledger -f file.csv print > file.journal and after that I can start web with hledger-web -f file.journal. When I try hledger-web -f file.csv, there is no error, web server is started but it shows only 0 values, like journal is empty...
UPDATE: It works. I do not know why I met this issue but when I try it with the latest hledger, then hledger-web can work with CSV file, no issue. On the other hand, I was not able to work with CSV file, maybe that another hledger-web server was already running or I tried with older version of hledger...
A-BUGSomething wrong, confusing or sub-standard in the software, docs, or user experience.csvThe csv file format, csv output format, or generally CSV-related.
I try to import CSV file, I think I create valid journal but hledger doesn't like it. Input CSV file:
Import rules:
Error during import, the issue:
When I create journal file with the same data, hledger processes it without any issue:
I wanted to report the issue with simpler CSV file but in this case hledger works without any issue; that is a mystery:
No issue in this case:
IMPORTANT UPDATE: I have found the source of this issue. Error in rules file, I define account1 as
and that is wrong, I have to define it as two items:
File demo.csv.rules was correct and that is why hledger processed file demo.csv without any issue...
This issue could be closed but I keep it open, maybe diagnostic could be improved...
UPDATE: sign in amount3 is wrong, it should be opposite (income should be negative and expense positive). This accounting error can be ignored, it has no impact to this issue..
The text was updated successfully, but these errors were encountered: