Realized I wasn't super clear here. 

I tried the script Martin suggested in this thread because i need to spit 
out holding positions at any given time that show more than 2 decimals of 
precision (crypto). 
    For holdings positions, use 
https://github.com/beancount/beancount/blob/master/beancount/projects/export.py

When I ran it on my beancount file, it generated the below errors. I don't 
know enough to understand how to debug what's going wrong...

Traceback (most recent call last):
  File "/Users/me/finances/beancount/reports/export.py", line 353, in 
<module>
    main()
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1128, 
in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1053, 
in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1395, 
in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 754, in 
invoke
    return __callback(*args, **kwargs)
  File "/Users/me/finances/beancount/reports/export.py", line 330, in main
    final_table = reorder_columns(joined_table, headers)
  File "/Users/me/finances/beancount/reports/export.py", line 238, in 
reorder_columns
    rows = [[row[index] for index in indexes]
  File "/Users/me/finances/beancount/reports/export.py", line 238, in 
<listcomp>
    rows = [[row[index] for index in indexes]
  File "/Users/me/finances/beancount/reports/export.py", line 238, in 
<listcomp>
    rows = [[row[index] for index in indexes]
IndexError: list index out of range
On Sunday, November 28, 2021 at 4:02:10 PM UTC-8 Jake Aust wrote:

> I've tried this script and it is spitting out errors. Any pointers what is 
> going on?
>
> Traceback (most recent call last):
>
>   File "/Users/me/finances/beancount/reports/export.py", line 353, in 
> <module>
>
>     main()
>
>   File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1128, 
> in __call__
>
>     return self.main(*args, **kwargs)
>
>   File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1053, 
> in main
>
>     rv = self.invoke(ctx)
>
>   File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1395, 
> in invoke
>
>     return ctx.invoke(self.callback, **ctx.params)
>
>   File "/usr/local/lib/python3.9/site-packages/click/core.py", line 754, 
> in invoke
>
>     return __callback(*args, **kwargs)
>
>   File "/Users/me/finances/beancount/reports/export.py", line 330, in main
>
>     final_table = reorder_columns(joined_table, headers)
>
>   File "/Users/me/finances/beancount/reports/export.py", line 238, in 
> reorder_columns
>
>     rows = [[row[index] for index in indexes]
>
>   File "/Users/me/finances/beancount/reports/export.py", line 238, in 
> <listcomp>
>
>     rows = [[row[index] for index in indexes]
>
>   File "/Users/me/finances/beancount/reports/export.py", line 238, in 
> <listcomp>
>
>     rows = [[row[index] for index in indexes]
>
> IndexError: list index out of range
>
> On Monday, June 14, 2021 at 11:55:16 PM UTC-7 [email protected] wrote:
>
>> > I have no background in python but hope to get going with the docs. 
>>
>> You're on the right track. Fava and bean-query are both very well 
>> documented. I'd suggest working through the docs and asking specific 
>> questions if they still remain unanswered.
>>
>> On Friday, June 11, 2021 at 9:09:34 AM UTC-7 [email protected] wrote:
>>
>>> Thank you. 
>>>
>>> Could you point me into the right direction how to use bean-query, for 
>>> example to:
>>>
>>> > list all entries for Expenses:Trading:Fees for a specific year and 
>>> return the total 
>>>
>>> I do have several similar queries and hope to get going once I know how 
>>> to start.
>>>
>>> I have no background in python but hope to get going with the docs.
>>>
>>> [email protected] schrieb am Freitag, 11. Juni 2021 um 17:27:46 UTC+2:
>>>
>>>> - Don't use bean-report, it's obsolete; do all your work with bean-query
>>>> - For holdings positions, use 
>>>> https://github.com/beancount/beancount/blob/master/beancount/projects/export.py
>>>>
>>>>
>>>> On Fri, Jun 11, 2021 at 11:24 AM david e <[email protected]> wrote:
>>>>
>>>>> Hello, I am new to beancount and still making small steps.
>>>>>
>>>>> I am managing my trading positions with it and would like to get a 
>>>>> better understanding of how to filter my data. 
>>>>>
>>>>> for example, I run bean-report myfile.bean print quite often to check 
>>>>> my entries and also bean-report myfile.bean holdings to have an 
>>>>> overview of my portfolio, but I am wondering how to…
>>>>>
>>>>> 1) look at it from a specific perspective in time, for example how to 
>>>>> print the portfolio for a specific start of a quarter, and…
>>>>> 2) how to list assets with bean-report myfile.bean holdings that have 
>>>>> multiple cost basis entries as one holding.
>>>>>
>>>>> thank you
>>>>>
>>>>> D
>>>>>
>>>>> -- 
>>>>>
>>>> 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/5bd08b8c-318f-494e-8963-41279d24a0d2n%40googlegroups.com
>>>>>  
>>>>> <https://groups.google.com/d/msgid/beancount/5bd08b8c-318f-494e-8963-41279d24a0d2n%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/a67bcd4b-0866-4db3-bad1-f21d2f11a431n%40googlegroups.com.

Reply via email to