Ledger giving unknown account/commodity warnings

111 views
Skip to first unread message

Oliver Hardy

unread,
Jun 19, 2022, 9:28:55 AM6/19/22
to Ledger
I am running emacs 28.1 and have upgraded to the most recent ledger-mode-20220617.1148.
I have changed nothing on my system (OpenBSD-current) but this morning, after entering several items in ledger, check-buffer came back with:

Warning: "/home/slaurel/ledger.dat", line 5177: Unknown account 'Income:SocSecurity'
Warning: "/home/slaurel/ledger.dat", line 5180: Unknown commodity '$'
Warning: "/home/slaurel/ledger.dat", line 5181: Unknown account 'Liabilities:Apple Pay'
Warning: "/home/slaurel/ledger.dat", line 5184: Unknown account 'Expenses:Food:Dining'
Warning: "/home/slaurel/ledger.dat", line 5184: Unknown commodity '$'
Warning: "/home/slaurel/ledger.dat", line 5185: Unknown account 'Expenses:Cash'

In my ~/.profile I have the lines:
export LEDGER_FILE=$HOME/Accounts.dat
export LEDGER_FILE=$HOME/ledger.dat

As I said have changed nothing and have no idea why I am suddenly getting these errors or where to look for a solution.

Any advice is appreciated.




Felipe Mica

unread,
Jun 19, 2022, 10:33:23 AM6/19/22
to ledge...@googlegroups.com
Can you send the content or attach the files? (remove sensitive information)

--

---
You received this message because you are subscribed to the Google Groups "Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ledger-cli+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ledger-cli/593c6d1c-8b52-4cec-88e1-4eda075cdc68n%40googlegroups.com.

Yuri Khan

unread,
Jun 19, 2022, 11:12:54 AM6/19/22
to Ledger
On Sun, 19 Jun 2022 at 20:28, Oliver Hardy <ohar...@gmail.com> wrote:

> In my ~/.profile I have the lines:
> export LEDGER_FILE=$HOME/Accounts.dat
> export LEDGER_FILE=$HOME/ledger.dat

This does not make much sense. You’re setting an environment variable
to point at one file, then reassign it to point at a different file.
Only the latter assignment takes effect.

Oliver Hardy

unread,
Jun 19, 2022, 11:41:17 AM6/19/22
to Ledger
I commented out the:
export LEDGER_FILE=$HOME/ledger.dat
in my ~/.profile and the errors have disappeared and everything appears to be working correctly.
What I don't understand is that I have had those 2 lines in ~/.profile ever since I started using ledger
over a year ago with no problem.

In any case, thanks for your assistance.
Reply all
Reply to author
Forward
0 new messages