I think beangrow probably needs to get updated to work with the master branch.
On Sun, Dec 1, 2024 at 9:47 PM fin <[email protected]> wrote: > fin wrote: > > This script is also referenced in Beancount 3 doc at: > > https://beancount.github.io/docs/beancount_v3.html > > "Projects. The beancount/projects directory contains the export script and > a project to produce data for a will. The will script will be moved outside > the core of Beancount, I'm not sure anyone's using that. Maybe the new > external plugins repo could include that script and other scripts I shared > under /experimental. The export script should be grouped together with > beancount/scripts/sql and other methods to send / share data outside of a > ledger; these could remain in the core (I'm using the export script > regularly to sync my aggregates and stock exposure to a Google Sheets doc > which reflects intraday changes)." > > > fin > > > > Martin Blais wrote: > > > > Martin, correct, it is a script referenced from beangrow > > via the following text: > > > > "(Finally, note that if all you need is a snapshot of your current > positions, that's already handled by the export script.)" which points at: > > > > > https://github.com/beancount/beancount/blob/v2/beancount/projects/export.py > > > > since it is doing pretty much most of what i wanted it to do > > i was hoping to take it and adapt it to a project i'm working > > on. i didn't want to reinvent the wheel of having to figure > > out how to load all my transactions, apply all the plugins, > > and then have to calculate the positions via going through > > all the transactions and adjusting lots, etc. of trades > > through all the years. > > > > fin > > > > > >> --0000000000005b869d06283d9823 > >> Content-Type: text/plain; charset="UTF-8" > >> Content-Transfer-Encoding: quoted-printable > >> > >> I think you're using some obsolete code. I don't see this on the master > >> branch. > >> > >> > >> On Sun, Dec 1, 2024 at 4:05=E2=80=AFPM fin <[email protected]> wrote: > >> > >>> > >>> Hello all, > >>> > >>> > >>> I'm trying to get this script to run and getting errors > >>> > >>> > >>> For version from 2.3.6 I get: > >>> > >>> > >>> (bc) me@ant(14)~/fin/beancount/stmon$ python export.py ledger.bc -c > fin > >>> INFO : Operating currency: USD > >>> Traceback (most recent call last): > >>> File "/home/me/fin/beancount/stmon/export.py", line 373, in <module> > >>> main() > >>> File "/home/me/fin/beancount/stmon/export.py", line 359, in main > >>> final_table =3D reorder_columns(joined_table, headers) > >>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > >>> File "/home/me/fin/beancount/stmon/export.py", line 247, in > >>> reorder_columns > >>> rows =3D [[row[index] for index in indexes] for row in table.rows] > >>> ~~~^^^^^^^ > >>> IndexError: list index out of range > >>> > >>> > >>> For version from current master (3.1.0.dev0) I get: > >>> > >>> > >>> (bc) me@ant(17)~/fin/beancount/stmon$ python export.py ledger.bc -c > fin > >>> Traceback (most recent call last): > >>> File "/home/me/fin/beancount/stmon/export.py", line 373, in <module> > >>> main() > >>> File "/home/me/fin/beancount/stmon/export.py", line 300, in main > >>> validate_entries(entries) > >>> File "/home/me/fin/beancount/stmon/export.py", line 48, in > >>> validate_entries > >>> if entry.flag =3D=3D flags.FLAG_UNREALIZED: > >>> ^^^^^^^^^^^^^^^^^^^^^ > >>> AttributeError: module 'beancount.core.flags' has no attribute > >>> 'FLAG_UNREALIZED' > >>> > >>> > >>> In either case I'm not a python guru yet enough to figure out > >>> what I am up against. When I examine indexes and table.rows things > >>> look ok to me. > >>> > >>> Thanks for any clues. > >>> > >>> > >>> fin > >>> > >>> -- > >>> 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 visit > >>> > https://groups.google.com/d/msgid/beancount/bjvu1l-75k.ln1%40anthive.com. > >>> > >> > >> --=20 > >> 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 e= > >> mail to [email protected]. > >> To view this discussion visit > https://groups.google.com/d/msgid/beancount/C= > >> AK21%2BhOpTmwt_NXotobGfZOrgLdb4LWd%2BPZJZxUzx8rCjpiEag%40mail.gmail.com > . > >> > >> --0000000000005b869d06283d9823 > >> Content-Type: text/html; charset="UTF-8" > >> Content-Transfer-Encoding: quoted-printable > >> > >><div dir=3D"ltr"><div class=3D"gmail_default" > style=3D"font-family:arial,sa= > >> ns-serif;font-size:small">I think you're using some obsolete code. > I do= > >> n't see this on the master branch.</div><div > class=3D"gmail_default" st= > >> > yle=3D"font-family:arial,sans-serif;font-size:small"><br></div></div><br><d= > >> iv class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Sun, > Dec = > >> 1, 2024 at 4:05=E2=80=AFPM fin <<a href=3D"mailto:[email protected] > ">fin@a= > >> nthive.com</a>> wrote:<br></div><blockquote class=3D"gmail_quote" > style= > >>=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid > rgb(204,204,204);padding= > >> -left:1ex"><br> > >> Hello all,<br> > >><br> > >><br> > >>=C2=A0 I'm trying to get this script to run and getting errors<br> > >><br> > >><br> > >>=C2=A0 For version from 2.3.6 I get:<br> > >><br> > >><br> > >> (bc) me@ant(14)~/fin/beancount/stmon$ python export.py ledger.bc -c > fin<br> > >> INFO=C2=A0 =C2=A0 : Operating currency: USD<br> > >> Traceback (most recent call last):<br> > >>=C2=A0 File "/home/me/fin/beancount/stmon/export.py", line > 373, i= > >> n <module><br> > >>=C2=A0 =C2=A0 main()<br> > >>=C2=A0 File "/home/me/fin/beancount/stmon/export.py", line > 359, i= > >> n main<br> > >>=C2=A0 =C2=A0 final_table =3D reorder_columns(joined_table, headers)<br> > >>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 > ^^^^^^^^^^^^= > >> ^^^^^^^^^^^^^^^^^^^^^^^^^^<br> > >>=C2=A0 File "/home/me/fin/beancount/stmon/export.py", line > 247, i= > >> n reorder_columns<br> > >>=C2=A0 =C2=A0 rows =3D [[row[index] for index in indexes] for row in > table.= > >> rows]<br> > >>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0~~~^^^^^^^<br> > >> IndexError: list index out of range<br> > >><br> > >><br> > >>=C2=A0 For version from current master (3.1.0.dev0) I get:<br> > >><br> > >><br> > >> (bc) me@ant(17)~/fin/beancount/stmon$ python export.py ledger.bc -c > fin<br> > >> Traceback (most recent call last):<br> > >>=C2=A0 File "/home/me/fin/beancount/stmon/export.py", line > 373, i= > >> n <module><br> > >>=C2=A0 =C2=A0 main()<br> > >>=C2=A0 File "/home/me/fin/beancount/stmon/export.py", line > 300, i= > >> n main<br> > >>=C2=A0 =C2=A0 validate_entries(entries)<br> > >>=C2=A0 File "/home/me/fin/beancount/stmon/export.py", line 48, > in= > >> validate_entries<br> > >>=C2=A0 =C2=A0 if entry.flag =3D=3D flags.FLAG_UNREALIZED:<br> > >>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 > =C2= > >>=A0^^^^^^^^^^^^^^^^^^^^^<br> > >> AttributeError: module 'beancount.core.flags' has no attribute > '= > >> ;FLAG_UNREALIZED'<br> > >><br> > >><br> > >>=C2=A0 In either case I'm not a python guru yet enough to figure > out<br= > >>> > >> what I am up against.=C2=A0 When I examine indexes and table.rows > things<br= > >>> > >> look ok to me.<br> > >><br> > >>=C2=A0 Thanks for any clues.<br> > >><br> > >><br> > >>=C2=A0 fin<br> > >><br> > >> -- <br> > >> You received this message because you are subscribed to the Google > Groups &= > >> quot;Beancount" group.<br> > >> To unsubscribe from this group and stop receiving emails from it, send > an e= > >> mail to <a href=3D"mailto:beancount%[email protected]" > target= > >>=3D"_blank">[email protected]</a>.<br> > >> To view this discussion visit <a href=3D" > https://groups.google.com/d/msgid/= > >> beancount/bjvu1l-75k.ln1%40anthive.com" rel=3D"noreferrer" > target=3D"_blank= > >> "> > https://groups.google.com/d/msgid/beancount/bjvu1l-75k.ln1%40anthive.com<= > >> /a>.<br> > >></blockquote></div> > >> > >><p></p> > >> > >> -- <br /> > >> You received this message because you are subscribed to the Google > Groups &= > >> quot;Beancount" group.<br /> > >> To unsubscribe from this group and stop receiving emails from it, send > an e= > >> mail to <a href=3D"mailto:[email protected] > ">beancount= > >> [email protected]</a>.<br /> > >> To view this discussion visit <a href=3D" > https://groups.google.com/d/msgid/= > >> beancount/CAK21%2BhOpTmwt_NXotobGfZOrgLdb4LWd%2BPZJZxUzx8rCjpiEag% > 40mail.gm= > >> ail.com?utm_medium=3Demail&utm_source=3Dfooter"> > https://groups.google.com/d= > >> > /msgid/beancount/CAK21%2BhOpTmwt_NXotobGfZOrgLdb4LWd%2BPZJZxUzx8rCjpiEag%40= > >> mail.gmail.com</a>.<br /> > >> > >> --0000000000005b869d06283d9823-- > >> > > > > -- > 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 visit > https://groups.google.com/d/msgid/beancount/3ljv1l-9tt.ln1%40anthive.com. > -- 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 visit https://groups.google.com/d/msgid/beancount/CAK21%2BhN2JM6PBF%2Byf_GzS%2BtgCuQGpvoM8Y4m10LWXeXqTfhJFA%40mail.gmail.com.
