-
-
Notifications
You must be signed in to change notification settings - Fork 317
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
check accounts & check tags broken in 1.40 ? #2247
Comments
Hi, thanks for the MRE.
I see you're using an unreleased developer build, but that should be fine.
I tested with that exact version and the file you gave, but can't reproduce the problems; both checks seem to be working normally here.
|
(on mac.)
Maybe there's another windows user who could try it.
Maybe also you are able to try it on a non-windows computer ? Perhaps with the 1.40 release ?
…On Mon, Sep 30, 2024, at 16:19, Simon Michael wrote:
Hi, thanks for the MRE.
I see you're using an unreleased developer build, but that should be fine.
I tested with that exact version and the file you gave, but can't reproduce the problems; both checks seem to be working normally here.
On Mon, Sep 30, 2024, at 12:37, PainFile wrote:
>
>
> Hello everyone, I currently use hledger to track my finances, I normally do Strick checks to my files once every month to make sure that everything is ok. With the release of 1.40 I notice that *check accounts* and *check tags* send some errors with my information (not present on 1.34 or lower).
>
> This is the MRE I can come up with:
>
> `;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> ; Start of Minimal, Reproducible Example (MRE).
>
> ; Commodities
> commodity "CD200130"
> format 1,000.00000000 "CD200130"
>
> commodity MXN
> format 1,000.00 MXN
>
> ; Accounts
> account Assets:Investing:Bonds:CetesDirecto:Invested:Cetes
> account Assets:Investing:Bonds:CetesDirecto:Wallet
>
> 2024/01/01 * Test transaction
> Assets:Investing:Bonds:CetesDirecto:Invested:Cetes 100 "CD200130" @ 9.94392220 MXN
> Assets:Investing:Bonds:CetesDirecto:Wallet
>
> ; End of MRE.
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
`
> I run on *Windows 11*. Under *hledger 1.34-g7a83578ec-20240601, windows-x86_64* if I go with "*.\bin\hledger.exe -f test.journal check -s*" nothing comes out, i. e. everyting is OK.
>
> If I change to *hledger 1.40-g0f31974c5-20240909, windows-x86_64* still under *Windows 11* and I run the same command I got the following error:
>
>>
>>
>> hledger.exe: Error: C:\Temp\test.journal:17:
>> 17 | 2024-01-01 * Test transaction
>> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>> | Assets:Investing:Bonds:CetesDirecto:Invested:Cetes 100 "CD200130" @ 9.94392220 MXN
>> | Assets:Investing:Bonds:CetesDirecto:Wallet -994.39222000 MXN
>>
>>
>>
>>
>> Strict account checking is enabled, and
>> account "equity:conversion:CD200130-MXN:CD200130" has not been declared.
>> Consider adding an account directive. Examples:
>>
>>
>>
>>
>> account equity:conversion:CD200130-MXN:CD200130
>> account equity:conversion:CD200130-MXN:CD200130 ; type:A ; (L,E,R,X,C,V)
>>
>>
> When trying to troubleshoot, going by each strick test I see that *.\bin\hledger.exe -f test.journal check accounts* is sending that error.
>
> Also, if I try *.\bin\hledger.exe -f test.journal check tags* I have another error:
>
>>
>>
>> hledger.exe: Error: C:\Temp\test.journal:17:
>> 17 | 2024-01-01 * Test transaction
>> | Assets:Investing:Bonds:CetesDirecto:Invested:Cetes 100 "CD200130" @ 9.94392220 MXN
>> | equity:conversion:CD200130-MXN:CD200130 -100 "CD200130"
>> | equity:conversion:CD200130-MXN:MXN 994.39222000 MXN
>> | Assets:Investing:Bonds:CetesDirecto:Wallet -994.39222000 MXN
>>
>>
>>
>>
>> Strict tag checking is enabled, and
>> tag "_price-matched" has not been declared.
>> Consider adding a tag directive. Examples:
>>
>>
>> tag _price-matched
>>
> I hope this information is enough for you to replicate the behavior, if not please let me know. Keep up with this great project!
>
>
>
> —
> Reply to this email directly, view it on GitHub <#2247>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAACPIEUGR7FWD4NIP6HFN3ZZHHAZAVCNFSM6AAAAABPEKU6T2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGU2TONZWG42DSOA>.
> You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
>
>
—
Reply to this email directly, view it on GitHub <#2247 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAACPIHRRNV3ICBZNLHOLLLZZIBB7AVCNFSM6AAAAABPEKU6T2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOBUGY2DQNRRGE>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
I just downloaded the 1.40 version again from the Official release binaries for Linux, Mac, Windows. (https://github.com/simonmichael/hledger/releases/tag/1.40) and it is the same version. It still throws the same error.
|
On Wed, Oct 2, 2024, at 09:47, PainFile wrote:
I just downloaded the 1.40 version again from the Official release binaries for Linux, Mac, Windows. (https://github.com/simonmichael/hledger/releases/tag/1.40) and it is the same version.
My apologies you're right, that is the 1.40 release. The version string looked odd to me.
I can't reproduce in a Windows 11 VM, either:
PS C:\Users\Simon Michael> type a.j
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Start of Minimal, Reproducible Example (MRE).
; Commodities
commodity "CD200130"
format 1,000.00000000 "CD200130"
commodity MXN
format 1,000.00 MXN
; Accounts
account Assets:Investing:Bonds:CetesDirecto:Invested:Cetes
account Assets:Investing:Bonds:CetesDirecto:Wallet
2024/01/01 * Test transaction
Assets:Investing:Bonds:CetesDirecto:Invested:Cetes 100 "CD200130" @ 9.94392220 MXN
Assets:Investing:Bonds:CetesDirecto:Wallet
; End of MRE.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
PS C:\Users\Simon Michael> hledger -f a.j check -s
PS C:\Users\Simon Michael> hledger -f a.j check accounts commodities
PS C:\Users\Simon Michael> hledger --version
hledger 1.40-g0f31974c5-20240909, windows-x86_64
|
Also the error message and the example file you've shown do not correspond to one another. Double check ? |
Thank you for bearing with me, I did more troubleshooting, and the error persist but I just found out it's only present when I use a config file (I missed to comment that I am using a hledger.conf since the beginning, my apologies):
This is the config file that I am using (mostly a copy of your example file):
I'm going to dowload some Linux ISO and will try to reproduce later. |
On Thu, Oct 3, 2024, at 05:11, PainFile wrote:
Thank you for bearing with me, I did more troubleshooting, and the error persist but I just found out it's only present when I use a config file (I missed to comment that I am using a hledger.conf since the beginning, my apologies):
Ahh. And I forgot to suggest to try running with -n to disable any possible config file. This is the new reality for troubleshooting since hledger 1.40. :-(
So the problem is that when you use --infer-equity, it creates postings to and from accounts with specific names, based on the commodities involved: see https://hledger.org/1.40/hledger.html#inferring-equity-conversion-postings .
So in that case to satisfy `check accounts`, you'd need to add declarations like these:
account Equity:Conversion:CD200130-MXN:CD200130
account Equity:Conversion:CD200130-MXN:MXN
Let's think about how to make this more intuitive.
|
Ahh. And I forgot to suggest to try running with -n to disable any possible config file. This is the new reality for troubleshooting since hledger 1.40. :-(
So the problem is that when you use --infer-equity, it creates postings to and from accounts with specific names, based on the commodities involved: see https://hledger.org/1.40/hledger.html#inferring-equity-conversion-postings .
So in that case to satisfy `check accounts`, you'd need to add declarations like these:
account Equity:Conversion:CD200130-MXN:CD200130
account Equity:Conversion:CD200130-MXN:MXN
Let's think about how to make this more intuitive.
I have added a note to the manual from 1.40 on, and to the sample config file, to start with.
Or possibly these accounts used by --infer-equity accounts should be exempt from strict account checking ? I'm not sure.
|
Ok, with -n both issues are gone. The |
Hello everyone, I currently use hledger to track my finances, I normally do Strick checks to my files once every month to make sure that everything is ok. With the release of 1.40 I notice that check accounts and check tags send some errors with my information (not present on 1.34 or lower).
This is the MRE I can come up with:
I run on Windows 11. Under hledger 1.34-g7a83578ec-20240601, windows-x86_64 if I go with ".\bin\hledger.exe -f test.journal check -s" nothing comes out, i. e. everyting is OK.
If I change to hledger 1.40-g0f31974c5-20240909, windows-x86_64 still under Windows 11 and I run the same command I got the following error:
When trying to troubleshoot, going by each strick test I see that .\bin\hledger.exe -f test.journal check accounts is sending that error.
Also, if I try .\bin\hledger.exe -f test.journal check tags I have another error:
I hope this information is enough for you to replicate the behavior, if not please let me know. Keep up with this great project!
The text was updated successfully, but these errors were encountered: