Nothing under /experiments is guaranteed to work, it's not technically part
of the beancount release.
(This has just been my sandbox over the years and a place to share some
experiments, and reduced scope of the repo in v3 I will move this to
another repository eventually. Probably "beanlab" or something like that.)


On Fri, Nov 27, 2020 at 5:59 PM Chary Chary <[email protected]> wrote:

> I am just trying to run monthly_balance.py
> <https://github.com/beancount/beancount/blob/v2/experiments/misc/monthly_balance.py>
>  on
> the file, generated with  bean-example and I get the following error
>
> C:\_code\py\2009 beancount fix>py "C:\_code\py\2009 beancount
> fix\beancount\experiments\misc\monthly_balance.py" example.bean
> Traceback (most recent call last):
>   File "C:\_code\py\2009 beancount
> fix\beancount\experiments\misc\monthly_balance.py", line 66, in <module>
>     main()
>   File "C:\_code\py\2009 beancount
> fix\beancount\experiments\misc\monthly_balance.py", line 47, in main
>     rtypes, rrows = query.run_query(entries, options_map, sql)
>   File "C:\_code\py\2009 beancount
> fix\beancount\beancount\query\query.py", line 48, in run_query
>     rtypes, rrows = query_execute.execute_query(c_query, entries,
> options_map)
>   File "C:\_code\py\2009 beancount
> fix\beancount\beancount\query\query_execute.py", line 381, in execute_query
>     result_types, result_rows = flatten_results(result_types, result_rows)
>   File "C:\_code\py\2009 beancount
> fix\beancount\beancount\query\query_execute.py", line 422, in
> flatten_results
>     value = value[irow] if irow < len(value) else None
> KeyError: 0
>
> When I try to remove FLATTEN
> <https://github.com/beancount/beancount/blob/90a7364eeeb4f83bb7b8093c427cb1575a123748/experiments/misc/monthly_balance.py#L42>at
> the end of the query, it goes further, but produces another error
>
> C:\_code\py\2009 beancount fix>py "C:\_code\py\2009 beancount
> fix\beancount\experiments\misc\monthly_balance.py" example.bean
> Traceback (most recent call last):
>   File "C:\_code\py\2009 beancount
> fix\beancount\experiments\misc\monthly_balance.py", line 65, in <module>
>     main()
>   File "C:\_code\py\2009 beancount
> fix\beancount\experiments\misc\monthly_balance.py", line 51, in main
>     d = out['{}/{:02d}'.format(row.year, row.month)][row.pos.lot.currency]
> AttributeError: 'Inventory' object has no attribute 'lot'
>
> Is this monthly_balance.py
> <https://github.com/beancount/beancount/blob/v2/experiments/misc/monthly_balance.py>
> and operational one?
>
>
> --
> 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/551372ea-4fd8-43b1-8757-728e02bd43c1n%40googlegroups.com
> <https://groups.google.com/d/msgid/beancount/551372ea-4fd8-43b1-8757-728e02bd43c1n%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/CAK21%2BhMzh%3Dj7z7b9gitL2ELQT3Gfj6nGXvpR2WozXpSVGexVrQ%40mail.gmail.com.

Reply via email to