Thanks for filing 
<https://github.com/redstreet/beancount_reds_plugins/issues/19>.

beancount.plugins.auto_accounts inserts 
an open for Expenses:Non-Retirement:Auto:Fit because it sees the close 
directive for it. The open and Close occur on the same date, leading to 
this error. Fixed by special casing this scenario 
<https://github.com/redstreet/beancount_reds_plugins/commit/ac64b959cd3befcd02e8bf654300f5348fc14e74>
.



On Monday, August 22, 2022 at 9:03:47 PM UTC-7 Red S wrote:

> Would you mind filing a bug in github with a minimal reproducible example? 
> If you feel up to it, a fix with a unit test is also appreciated.
>
> On Monday, August 22, 2022 at 6:30:51 PM UTC-7 [email protected] wrote:
>
>> Hi,
>> I still get this error message in fava with your latest change if I get 
>> rid of the open directive, and rely on the auto_accounts plugin.
>> [image: image.png]
>> Thanks,
>>
>>
>> On Mon, Aug 22, 2022 at 7:39 PM Red S <[email protected]> wrote:
>>
>>>
>>>
>>> On Monday, August 22, 2022 at 3:33:23 PM UTC-7 Red S wrote:
>>>
>>>> That was it. Swapping the order of the two plugins fixed the error.
>>>>>
>>>>
>>> Documented in README.md
>>>  
>>>
>>>> In addition, auto_accounts opens the leaves automatically, but it does 
>>>>> not add a directive to open an ancestor account if that's missing. I had 
>>>>> another set of transactions with a different broker, and all the leaf 
>>>>> accounts had an open statement, but not the parent one (...:WiseBanyan 
>>>>> was 
>>>>> never open, but ...:WiseBanyan:Cash, ...:WiseBanyan:APPL, etc were).
>>>>>
>>>>
>>>> Yeah, I ran into that case as well. autoclose_tree now handles it 
>>>> <https://github.com/redstreet/beancount_reds_plugins/commit/649461e4658ffbfb7e6d7ec379da54897c948f15>
>>>> .
>>>>
>>>> You can close unopened parents:
>>>> 2017-11-10 open Assets:Brokerage:AAPL
>>>> 2017-11-10 open Assets:Brokerage:ORNG
>>>> 2018-11-10 close Assets:Brokerage ; this account was never opened, and 
>>>> this would
>>>>                                   ; normally be an invalid directive 
>>>>
>>>> becomes:
>>>> 2017-11-10 open Assets:Brokerage:AAPL
>>>> 2017-11-10 open Assets:Brokerage:ORNG
>>>> 2018-11-10 close Assets:Brokerage:AAPL
>>>> 2018-11-10 close Assets:Brokerage:ORNG
>>>>
>>>>
>>>>  
>>>>
>>> -- 
>>>
>> You received this message because you are subscribed to a topic in the 
>>> Google Groups "Beancount" group.
>>> To unsubscribe from this topic, visit 
>>> https://groups.google.com/d/topic/beancount/mTDZ3sQjH9U/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to 
>>> [email protected].
>>>
>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/beancount/b0997e30-06db-4eab-8dd4-12d486406a1an%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/beancount/b0997e30-06db-4eab-8dd4-12d486406a1an%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/db1c9b02-7a0d-4ec7-9e0f-5c48691b626fn%40googlegroups.com.

Reply via email to