Thanks for sharing! Added to the contrib doc. On Sun, Jan 12, 2025 at 12:04 PM fin <f...@anthive.com> wrote:
> Martin Blais wrote: > > Version 0.0.1 is out at last. I don't have much time in the > warmer weather with so many gardens, but now I've had a bit more > time to work on this. > > I took the export.py script, made it so it could finish loading > transactions and then added my own framework around it so I can > generate Buy and Sell transactions (Splits will be worked on as > soon as I need it again, but at the moment that isn't important to > me as much as a few other things). > > It still generates csv files if needed, but the output will > not be exactly like the original version so don't expect that, > I just didn't want to remove those options since they can be > helpful for examining what is going on. > > It is a command line python program for Linux or any other > system that will let you run python and also system access > so that it can run autobean-format and a few other shell > commands. > > It does not currently change any original data files to > append new transactions or reprocess the Account heirarchy > unless you copy the output file or cut and past the transactions > from the screen and then restart the script again. > > But it does already improve my own time and energy spent > putting in new transactions in that I don't have to hunt > through my file of transactions to find the particular last > lot I need to know about if I am selling. And it also does > the math right and the format is done for me by autobean- > format so the results look like all the rest of my entries. > > It does LIFO by default on sales, but can be switched to > FIFO and the account used can be switched too if you trade > in more than one (I usually am trading in a ROTH account > so that is the default). > > Of course, it's free code for anyone else to take and play > around with and change however. I don't recommend it at > the moment because it doesn't rescan the transactions in > between each Buy or Sell, but it doesn't take much for me > to cut and paste the transactions to the data files and > then rerun the script to get an up to the moment display. > > Considering what I was doing before it has helped. Next > version will deal with appending transactions to a temporary > file in the Account tree and then reprocessing the transactions > or just that file (if I can figure out how to do that). > > https://github.com/flowerbug/bcgt > > > As a side note it is practical projects that get me further > into working with Python. I am by no means a good Python > programmer yet, but as I keep poking at it I do improve. :) > > The code needs a lot of cleanup and reorganization but as > it sits now it works enough that I can use it and that is to > me at least a POC program which helps. > > Thanks Martin for the original program I could use. :) > > > fin > > > > --00000000000048f14f06284cce08 > > Content-Type: text/plain; charset="UTF-8" > > Content-Transfer-Encoding: quoted-printable > > > > I think beangrow probably needs to get updated to work with the master > > branch. > > > > > > > > On Sun, Dec 1, 2024 at 9:47=E2=80=AFPM fin <f...@anthive.com> 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 > an= > > d > >> a project to produce data for a will. The will script will be moved > outsi= > > de > >> 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 > share= > > d > >> 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=3D"UTF-8" > >> >> Content-Transfer-Encoding: quoted-printable > >> >> > >> >> I think you're using some obsolete code. I don't see this on the > maste= > > r > >> >> branch. > >> >> > >> >> > >> >> On Sun, Dec 1, 2024 at 4:05=3DE2=3D80=3DAFPM fin <f...@anthive.com> > wro= > > te: > >> >> > >> >>> > >> >>> 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 =3D3D reorder_columns(joined_table, headers) > >> >>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > >> >>> File "/home/me/fin/beancount/stmon/export.py", line 247, in > >> >>> reorder_columns > >> >>> rows =3D3D [[row[index] for index in indexes] for row in > table.ro= > > ws] > >> >>> ~~~^^^^^^^ > >> >>> 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 =3D3D=3D3D 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, > sen= > > d > >> an > >> >>> email to beancount+unsubscr...@googlegroups.com. > >> >>> To view this discussion visit > >> >>> > >> > https://groups.google.com/d/msgid/beancount/bjvu1l-75k.ln1%40anthive.com. > >> >>> > >> >> > >> >> --=3D20 > >> >> You received this message because you are subscribed to the Google > >> Groups "=3D > >> >> Beancount" group. > >> >> To unsubscribe from this group and stop receiving emails from it, > send > >> an e=3D > >> >> mail to beancount+unsubscr...@googlegroups.com. > >> >> To view this discussion visit > >> https://groups.google.com/d/msgid/beancount/C=3D > >> >> AK21%2BhOpTmwt_NXotobGfZOrgLdb4LWd%2BPZJZxUzx8rCjpiEag% > 40mail.gmail.co= > > m > >> . > >> >> > >> >> --0000000000005b869d06283d9823 > >> >> Content-Type: text/html; charset=3D"UTF-8" > >> >> Content-Transfer-Encoding: quoted-printable > >> >> > >> >><div dir=3D3D"ltr"><div class=3D3D"gmail_default" > >> style=3D3D"font-family:arial,sa=3D > >> >> ns-serif;font-size:small">I think you're using some obsolete > code. > >> I do=3D > >> >> n't see this on the master branch.</div><div > >> class=3D3D"gmail_default" st=3D > >> >> > >> > yle=3D3D"font-family:arial,sans-serif;font-size:small"><br></div></div><b= > > r><d=3D > >> >> iv class=3D3D"gmail_quote"><div dir=3D3D"ltr" > class=3D3D"gmail_attr">O= > > n Sun, > >> Dec =3D > >> >> 1, 2024 at 4:05=3DE2=3D80=3DAFPM fin <<a href=3D3D"mailto: > fin@anthi= > > ve.com > >> ">fin@a=3D > >> >> nthive.com</a>> wrote:<br></div><blockquote > class=3D3D"gmail_quote" > >> style=3D > >> >>=3D3D"margin:0px 0px 0px 0.8ex;border-left:1px solid > >> rgb(204,204,204);padding=3D > >> >> -left:1ex"><br> > >> >> Hello all,<br> > >> >><br> > >> >><br> > >> >>=3DC2=3DA0 I'm trying to get this script to run and getting > errors<= > > br> > >> >><br> > >> >><br> > >> >>=3DC2=3DA0 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=3DC2=3DA0 =3DC2=3DA0 : Operating currency: USD<br> > >> >> Traceback (most recent call last):<br> > >> >>=3DC2=3DA0 File "/home/me/fin/beancount/stmon/export.py", > lin= > > e > >> 373, i=3D > >> >> n <module><br> > >> >>=3DC2=3DA0 =3DC2=3DA0 main()<br> > >> >>=3DC2=3DA0 File "/home/me/fin/beancount/stmon/export.py", > lin= > > e > >> 359, i=3D > >> >> n main<br> > >> >>=3DC2=3DA0 =3DC2=3DA0 final_table =3D3D reorder_columns(joined_table, > h= > > eaders)<br> > >> >>=3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 > =3DC2= > >=3DA0 =3DC2=3DA0 =3DC2=3DA0 > >> ^^^^^^^^^^^^=3D > >> >> ^^^^^^^^^^^^^^^^^^^^^^^^^^<br> > >> >>=3DC2=3DA0 File "/home/me/fin/beancount/stmon/export.py", > lin= > > e > >> 247, i=3D > >> >> n reorder_columns<br> > >> >>=3DC2=3DA0 =3DC2=3DA0 rows =3D3D [[row[index] for index in indexes] > for= > > row in > >> table.=3D > >> >> rows]<br> > >> >>=3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 > =3DC2= > >=3DA0~~~^^^^^^^<br> > >> >> IndexError: list index out of range<br> > >> >><br> > >> >><br> > >> >>=3DC2=3DA0 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> > >> >>=3DC2=3DA0 File "/home/me/fin/beancount/stmon/export.py", > lin= > > e > >> 373, i=3D > >> >> n <module><br> > >> >>=3DC2=3DA0 =3DC2=3DA0 main()<br> > >> >>=3DC2=3DA0 File "/home/me/fin/beancount/stmon/export.py", > lin= > > e > >> 300, i=3D > >> >> n main<br> > >> >>=3DC2=3DA0 =3DC2=3DA0 validate_entries(entries)<br> > >> >>=3DC2=3DA0 File "/home/me/fin/beancount/stmon/export.py", > lin= > > e 48, > >> in=3D > >> >> validate_entries<br> > >> >>=3DC2=3DA0 =3DC2=3DA0 if entry.flag =3D3D=3D3D > flags.FLAG_UNREALIZED:<b= > > r> > >> >>=3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 > =3DC2= > >=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 > >> =3DC2=3D > >> >>=3DA0^^^^^^^^^^^^^^^^^^^^^<br> > >> >> AttributeError: module 'beancount.core.flags' has no > attribute > >> '=3D > >> >> ;FLAG_UNREALIZED'<br> > >> >><br> > >> >><br> > >> >>=3DC2=3DA0 In either case I'm not a python guru yet enough to > figur= > > e > >> out<br=3D > >> >>> > >> >> what I am up against.=3DC2=3DA0 When I examine indexes and table.rows > >> things<br=3D > >> >>> > >> >> look ok to me.<br> > >> >><br> > >> >>=3DC2=3DA0 Thanks for any clues.<br> > >> >><br> > >> >><br> > >> >>=3DC2=3DA0 fin<br> > >> >><br> > >> >> -- <br> > >> >> You received this message because you are subscribed to the Google > >> Groups &=3D > >> >> quot;Beancount" group.<br> > >> >> To unsubscribe from this group and stop receiving emails from it, > send > >> an e=3D > >> >> mail to <a href=3D3D"mailto:beancount%2bunsubscr...@googlegroups.com > " > >> target=3D > >> >>=3D3D"_blank">beancount+unsubscr...@googlegroups.com</a>.<br> > >> >> To view this discussion visit <a href=3D3D" > >> https://groups.google.com/d/msgid/=3D > >> >> beancount/bjvu1l-75k.ln1%40anthive.com" rel=3D3D"noreferrer" > >> target=3D3D"_blank=3D > >> >> "> > >> > https://groups.google.com/d/msgid/beancount/bjvu1l-75k.ln1%40anthive.com<= > >=3D > >> >> /a>.<br> > >> >></blockquote></div> > >> >> > >> >><p></p> > >> >> > >> >> -- <br /> > >> >> You received this message because you are subscribed to the Google > >> Groups &=3D > >> >> quot;Beancount" group.<br /> > >> >> To unsubscribe from this group and stop receiving emails from it, > send > >> an e=3D > >> >> mail to <a href=3D3D"mailto:beancount+unsubscr...@googlegroups.com > >> ">beancount=3D > >> >> +unsubscr...@googlegroups.com</a>.<br /> > >> >> To view this discussion visit <a href=3D3D" > >> https://groups.google.com/d/msgid/=3D > >> >> beancount/CAK21%2BhOpTmwt_NXotobGfZOrgLdb4LWd%2BPZJZxUzx8rCjpiEag% > >> 40mail.gm=3D > >> >> ail.com?utm_medium=3D3Demail&utm_source=3D3Dfooter"> > >> https://groups.google.com/d=3D > >> >> > >> > /msgid/beancount/CAK21%2BhOpTmwt_NXotobGfZOrgLdb4LWd%2BPZJZxUzx8rCjpiEag%= > > 40=3D > >> >> 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 beancount+unsubscr...@googlegroups.com. > >> To view this discussion visit > >> > https://groups.google.com/d/msgid/beancount/3ljv1l-9tt.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 beancount+unsubscr...@googlegroups.com. > > To view this discussion visit > https://groups.google.com/d/msgid/beancount/C= > > AK21%2BhN2JM6PBF%2Byf_GzS%2BtgCuQGpvoM8Y4m10LWXeXqTfhJFA% > 40mail.gmail.com. > > > > --00000000000048f14f06284cce08 > > 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 beangrow probably needs to get updated > to= > > work with=C2=A0the master branch.</div><div class=3D"gmail_default" > style= > >=3D"font-family:arial,sans-serif;font-size:small"><br></div><div > class=3D"g= > > mail_default" > style=3D"font-family:arial,sans-serif;font-size:small"><br></= > > div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" > class=3D"gmail_at= > > tr">On Sun, Dec 1, 2024 at 9:47=E2=80=AFPM fin <<a href=3D"mailto: > fin@an= > > thive.com">f...@anthive.com</a>> wrote:<br></div><blockquote > class=3D"gma= > > il_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid > rgb(204,2= > > 04,204);padding-left:1ex">fin wrote:<br> > ><br> > >=C2=A0 This script is also referenced in Beancount 3 doc at:<br> > ><br> > ><a href=3D"https://beancount.github.io/docs/beancount_v3.html" > rel=3D"noref= > > errer" target=3D"_blank"> > https://beancount.github.io/docs/beancount_v3.html= > ></a><br> > ><br> > > "Projects. The beancount/projects directory contains the export > script= > > and a project to produce data for a will. The will script will be moved > ou= > > tside the core of Beancount, I'm not sure anyone's using that. > Mayb= > > e 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 > scrip= > > t regularly to sync my aggregates and stock exposure to a Google Sheets > doc= > > which reflects intraday changes)."<br> > ><br> > ><br> > >=C2=A0 fin<br> > ><br> > ><br> > > > Martin Blais wrote:<br> > > ><br> > > >=C2=A0 =C2=A0Martin, correct, it is a script referenced from > beangrow<b= > > r> > > > via the following text:<br> > > ><br> > > > "(Finally, note that if all you need is a snapshot of your > curren= > > t positions, that's already handled by the export script.)" > which = > > points at:<br> > > ><br> > > >=C2=A0 =C2=A0<a href=3D" > https://github.com/beancount/beancount/blob/v2/= > > beancount/projects/export.py" rel=3D"noreferrer" > target=3D"_blank">https://= > > github.com/beancount/beancount/blob/v2/beancount/projects/export.py > </a><br> > > ><br> > > >=C2=A0 =C2=A0since it is doing pretty much most of what i wanted it > to = > > do<br> > > > i was hoping to take it and adapt it to a project i'm > working<br> > > > on.=C2=A0 i didn't want to reinvent the wheel of having to > figure<= > > br> > > > out how to load all my transactions, apply all the plugins,<br> > > > and then have to calculate the positions via going through<br> > > > all the transactions and adjusting lots, etc. of trades<br> > > > through all the years.<br> > > ><br> > > >=C2=A0 =C2=A0fin<br> > > ><br> > > ><br> > > >> --0000000000005b869d06283d9823<br> > > >> Content-Type: text/plain; charset=3D"UTF-8"<br> > > >> Content-Transfer-Encoding: quoted-printable<br> > > >><br> > > >> I think you're using some obsolete code. I don't see > this = > > on the master<br> > > >> branch.<br> > > >><br> > > >><br> > > >> On Sun, Dec 1, 2024 at 4:05=3DE2=3D80=3DAFPM fin <<a > href=3D"ma= > > ilto:f...@anthive.com" target=3D"_blank">f...@anthive.com</a>> > wrote:<br> > > >><br> > > >>><br> > > >>> Hello all,<br> > > >>><br> > > >>><br> > > >>>=C2=A0 =C2=A0I'm trying to get this script to run and > getti= > > ng errors<br> > > >>><br> > > >>><br> > > >>>=C2=A0 =C2=A0For 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 =C2=A0File > "/home/me/fin/beancount/stmon/export.py&= > > quot;, line 373, in <module><br> > > >>>=C2=A0 =C2=A0 =C2=A0main()<br> > > >>>=C2=A0 =C2=A0File > "/home/me/fin/beancount/stmon/export.py&= > > quot;, line 359, in main<br> > > >>>=C2=A0 =C2=A0 =C2=A0final_table =3D3D > reorder_columns(joined_ta= > > ble, headers)<br> > > >>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 > =C2=A0 = > >=C2=A0^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^<br> > > >>>=C2=A0 =C2=A0File > "/home/me/fin/beancount/stmon/export.py&= > > quot;, line 247, in<br> > > >>> reorder_columns<br> > > >>>=C2=A0 =C2=A0 =C2=A0rows =3D3D [[row[index] for index in > indexe= > > s] 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 =C2=A0For 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 =C2=A0File > "/home/me/fin/beancount/stmon/export.py&= > > quot;, line 373, in <module><br> > > >>>=C2=A0 =C2=A0 =C2=A0main()<br> > > >>>=C2=A0 =C2=A0File > "/home/me/fin/beancount/stmon/export.py&= > > quot;, line 300, in main<br> > > >>>=C2=A0 =C2=A0 =C2=A0validate_entries(entries)<br> > > >>>=C2=A0 =C2=A0File > "/home/me/fin/beancount/stmon/export.py&= > > quot;, line 48, in<br> > > >>> validate_entries<br> > > >>>=C2=A0 =C2=A0 =C2=A0if entry.flag =3D3D=3D3D > flags.FLAG_UNREALI= > > ZED:<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 a= > > ttribute<br> > > >>> 'FLAG_UNREALIZED'<br> > > >>><br> > > >>><br> > > >>>=C2=A0 =C2=A0In either case I'm not a python guru yet > enoug= > > h to figure out<br> > > >>> what I am up against.=C2=A0 When I examine indexes and > table.r= > > ows things<br> > > >>> look ok to me.<br> > > >>><br> > > >>>=C2=A0 =C2=A0Thanks for any clues.<br> > > >>><br> > > >>><br> > > >>>=C2=A0 =C2=A0fin<br> > > >>><br> > > >>> --<br> > > >>> You received this message because you are subscribed to the > Go= > > ogle Groups<br> > > >>> "Beancount" group.<br> > > >>> To unsubscribe from this group and stop receiving emails > from = > > it, send an<br> > > >>> email to <a href=3D"mailto: > beancount%2Bunsubscribe@googlegroup= > > s.com" target=3D"_blank">beancount+unsubscr...@googlegroups.com</a>.<br> > > >>> To view this discussion visit<br> > > >>> <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> > > >>><br> > > >><br> > > >> --=3D20<br> > > >> You received this message because you are subscribed to the > Google= > > Groups "=3D<br> > > >> Beancount" group.<br> > > >> To unsubscribe from this group and stop receiving emails from > it, = > > send an e=3D<br> > > >> mail to <a href=3D"mailto: > beancount%2bunsubscr...@googlegroups.com= > > " target=3D"_blank">beancount+unsubscr...@googlegroups.com</a>.<br> > > >> To view this discussion visit <a href=3D" > https://groups.google.com= > > /d/msgid/beancount/C=3D" rel=3D"noreferrer" target=3D"_blank"> > https://group= > > s.google.com/d/msgid/beancount/C=3D</a><br> > > >> AK21%2BhOpTmwt_NXotobGfZOrgLdb4LWd%2BPZJZxUzx8rCjpiEag%<a > href=3D"= > > http://40mail.gmail.com" rel=3D"noreferrer" > target=3D"_blank">40mail.gmail.= > > com</a>.<br> > > >><br> > > >> --0000000000005b869d06283d9823<br> > > >> Content-Type: text/html; charset=3D"UTF-8"<br> > > >> Content-Transfer-Encoding: quoted-printable<br> > > >><br> > > >><div dir=3D3D"ltr"><div > class=3D3D"gmail_de= > > fault" style=3D3D"font-family:arial,sa=3D<br> > > >> ns-serif;font-size:small">I think you&#39;re using > som= > > e obsolete code. I do=3D<br> > > >> n&#39;t see this on the master branch.</div><div > clas= > > s=3D3D"gmail_default" st=3D<br> > > >> > yle=3D3D"font-family:arial,sans-serif;font-size:small"&g= > > t;<br></div></div><br><d=3D<br> > > >> iv class=3D3D"gmail_quote"><div > dir=3D3D"ltr&= > > quot; class=3D3D"gmail_attr">On Sun, Dec =3D<br> > > >> 1, 2024 at 4:05=3DE2=3D80=3DAFPM fin &lt;<a > href=3D3D"= > > mailto:<a href=3D"mailto:f...@anthive.com" target=3D"_blank"> > f...@anthive.com= > ></a>">fin@a=3D<br> > > >> <a href=3D"http://nthive.com" rel=3D"noreferrer" > target=3D"_blank"= > >>nthive.com</a></a>&gt; > wrote:<br></div><blockquot= > > e class=3D3D"gmail_quote" style=3D<br> > > >>=3D3D"margin:0px 0px 0px 0.8ex;border-left:1px solid > rgb(204,2= > > 04,204);padding=3D<br> > > >> -left:1ex"><br><br> > > >> Hello all,<br><br> > > >><br><br> > > >><br><br> > > >>=3DC2=3DA0 I&#39;m trying to get this script to run and > getting= > > errors<br><br> > > >><br><br> > > >><br><br> > > >>=3DC2=3DA0 For version from 2.3.6 I get:<br><br> > > >><br><br> > > >><br><br> > > >> (bc) me@ant(14)~/fin/beancount/stmon$ python export.py > ledger.bc -= > > c fin<br><br> > > >> INFO=3DC2=3DA0 =3DC2=3DA0 : Operating currency: > USD<br><br> > > >> Traceback (most recent call last):<br><br> > > >>=3DC2=3DA0 File > &quot;/home/me/fin/beancount/stmon/export.py&am= > > p;quot;, line 373, i=3D<br> > > >> n &lt;module&gt;<br><br> > > >>=3DC2=3DA0 =3DC2=3DA0 main()<br><br> > > >>=3DC2=3DA0 File > &quot;/home/me/fin/beancount/stmon/export.py&am= > > p;quot;, line 359, i=3D<br> > > >> n main<br><br> > > >>=3DC2=3DA0 =3DC2=3DA0 final_table =3D3D > reorder_columns(joined_tabl= > > e, headers)<br><br> > > >>=3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 > =3DC2=3DA0 = > >=3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 ^^^^^^^^^^^^=3D<br> > > >> ^^^^^^^^^^^^^^^^^^^^^^^^^^<br><br> > > >>=3DC2=3DA0 File > &quot;/home/me/fin/beancount/stmon/export.py&am= > > p;quot;, line 247, i=3D<br> > > >> n reorder_columns<br><br> > > >>=3DC2=3DA0 =3DC2=3DA0 rows =3D3D [[row[index] for index in > indexes]= > > for row in table.=3D<br> > > >> rows]<br><br> > > >>=3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 > =3DC2=3DA0 = > >=3DC2=3DA0~~~^^^^^^^<br><br> > > >> IndexError: list index out of range<br><br> > > >><br><br> > > >><br><br> > > >>=3DC2=3DA0 For version from current master (3.1.0.dev0) I > get:<b= > > r><br> > > >><br><br> > > >><br><br> > > >> (bc) me@ant(17)~/fin/beancount/stmon$ python export.py > ledger.bc -= > > c fin<br><br> > > >> Traceback (most recent call last):<br><br> > > >>=3DC2=3DA0 File > &quot;/home/me/fin/beancount/stmon/export.py&am= > > p;quot;, line 373, i=3D<br> > > >> n &lt;module&gt;<br><br> > > >>=3DC2=3DA0 =3DC2=3DA0 main()<br><br> > > >>=3DC2=3DA0 File > &quot;/home/me/fin/beancount/stmon/export.py&am= > > p;quot;, line 300, i=3D<br> > > >> n main<br><br> > > >>=3DC2=3DA0 =3DC2=3DA0 validate_entries(entries)<br><br> > > >>=3DC2=3DA0 File > &quot;/home/me/fin/beancount/stmon/export.py&am= > > p;quot;, line 48, in=3D<br> > > >>=C2=A0 validate_entries<br><br> > > >>=3DC2=3DA0 =3DC2=3DA0 if entry.flag =3D3D=3D3D > flags.FLAG_UNREALIZE= > > D:<br><br> > > >>=3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 > =3DC2=3DA0 = > >=3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3D<br> > > >>=3DA0^^^^^^^^^^^^^^^^^^^^^<br><br> > > >> AttributeError: module &#39;beancount.core.flags&#39; > has = > > no attribute &#39=3D<br> > > >> ;FLAG_UNREALIZED&#39;<br><br> > > >><br><br> > > >><br><br> > > >>=3DC2=3DA0 In either case I&#39;m not a python guru yet > enough = > > to figure out<br=3D<br> > > >>><br> > > >> what I am up against.=3DC2=3DA0 When I examine indexes and > table.r= > > ows things<br=3D<br> > > >>><br> > > >> look ok to me.<br><br> > > >><br><br> > > >>=3DC2=3DA0 Thanks for any clues.<br><br> > > >><br><br> > > >><br><br> > > >>=3DC2=3DA0 fin<br><br> > > >><br><br> > > >> -- <br><br> > > >> You received this message because you are subscribed to the > Google= > > Groups &=3D<br> > > >> quot;Beancount&quot; group.<br><br> > > >> To unsubscribe from this group and stop receiving emails from > it, = > > send an e=3D<br> > > >> mail to <a href=3D3D"mailto:<a href=3D"mailto: > beancount%25= > > 2bunsubscr...@googlegroups.com" > target=3D"_blank">beancount%2Bunsubscribe@g= > > ooglegroups.com</a>" target=3D<br> > > >>=3D3D"_blank"><a href=3D"mailto: > beancount%2Bunsubscrib= > > e...@googlegroups.com" target=3D"_blank"> > beancount+unsubscr...@googlegroups.co= > > m</a></a>.<br><br> > > >> To view this discussion visit <a href=3D3D"<a > href=3D"http= > > s://groups.google.com/d/msgid/=3D" rel=3D"noreferrer" > target=3D"_blank">htt= > > ps://groups.google.com/d/msgid/=3D</a><br> > > >> beancount/bjvu1l-75k.ln1%<a href=3D"http://40anthive.com" > rel=3D"n= > > oreferrer" target=3D"_blank">40anthive.com</a>" > rel=3D3D"noreferr= > > er" target=3D3D"_blank=3D<br> > > >> "><a href=3D" > https://groups.google.com/d/msgid/beancount/b= > > jvu1l-75k.ln1%40anthive.com" rel=3D"noreferrer" target=3D"_blank"> > https://g= > > roups.google.com/d/msgid/beancount/bjvu1l-75k.ln1%40anthive.com > </a><=3D<= > > br> > > >> /a>.<br><br> > > >></blockquote></div><br> > > >><br> > > >><p></p><br> > > >><br> > > >> -- <br /><br> > > >> You received this message because you are subscribed to the > Google= > > Groups &=3D<br> > > >> quot;Beancount&quot; group.<br /><br> > > >> To unsubscribe from this group and stop receiving emails from > it, = > > send an e=3D<br> > > >> mail to <a href=3D3D"mailto:<a href=3D"mailto: > beancount%2B= > > unsubscr...@googlegroups.com" > target=3D"_blank">beancount+unsubscribe@googl= > > egroups.com</a>">beancount=3D<br> > > >> +<a href=3D"mailto:unsubscr...@googlegroups.com" > target=3D"_blank"= > >>unsubscr...@googlegroups.com</a></a>.<br /><br> > > >> To view this discussion visit <a href=3D3D"<a > href=3D"http= > > s://groups.google.com/d/msgid/=3D" rel=3D"noreferrer" > target=3D"_blank">htt= > > ps://groups.google.com/d/msgid/=3D</a><br> > > >> > beancount/CAK21%2BhOpTmwt_NXotobGfZOrgLdb4LWd%2BPZJZxUzx8rCjpiEag%= > ><a href=3D"http://40mail.gm" rel=3D"noreferrer" target=3D"_blank"> > 40mail.gm= > ></a>=3D<br> > > >> <a href=3D" > http://ail.com?utm_medium=3D3Demail&utm_source=3D3D= > > footer" rel=3D"noreferrer" target=3D"_blank"> > ail.com?utm_medium=3D3Demail&a= > > mp;utm_source=3D3Dfooter</a>"><a href=3D" > https://groups.google.com/= > > d=3D" rel=3D"noreferrer" target=3D"_blank"> > https://groups.google.com/d=3D</= > > a><br> > > >> > /msgid/beancount/CAK21%2BhOpTmwt_NXotobGfZOrgLdb4LWd%2BPZJZxUzx8rC= > > jpiEag%40=3D<br> > > >> <a href=3D"http://mail.gmail.com" rel=3D"noreferrer" > target=3D"_bl= > > ank">mail.gmail.com</a></a>.<br /><br> > > >><br> > > >> --0000000000005b869d06283d9823--<br> > > >><br> > > ><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%2bunsubscr...@googlegroups.com" > target= > >=3D"_blank">beancount+unsubscr...@googlegroups.com</a>.<br> > > To view this discussion visit <a href=3D" > https://groups.google.com/d/msgid/= > > beancount/3ljv1l-9tt.ln1%40anthive.com" rel=3D"noreferrer" > target=3D"_blank= > > "> > https://groups.google.com/d/msgid/beancount/3ljv1l-9tt.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:beancount+unsubscr...@googlegroups.com > ">beancount= > > +unsubscr...@googlegroups.com</a>.<br /> > > To view this discussion visit <a href=3D" > https://groups.google.com/d/msgid/= > > > beancount/CAK21%2BhN2JM6PBF%2Byf_GzS%2BtgCuQGpvoM8Y4m10LWXeXqTfhJFA%40mail.= > > gmail.com?utm_medium=3Demail&utm_source=3Dfooter"> > https://groups.google.com= > > > /d/msgid/beancount/CAK21%2BhN2JM6PBF%2Byf_GzS%2BtgCuQGpvoM8Y4m10LWXeXqTfhJF= > > A%40mail.gmail.com</a>.<br /> > > > > --00000000000048f14f06284cce08-- > > > > -- > 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 beancount+unsubscr...@googlegroups.com. > To view this discussion visit > https://groups.google.com/d/msgid/beancount/10ob5l-f0p.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 beancount+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/beancount/CAK21%2BhNx799T-n0gHq3%2BPEdfRPYm2h4L5Hfm7vwGuwT98XNPqQ%40mail.gmail.com.