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&#39;re using some obsolete
> code.
> >> I do=3D
> >> >> n&#39;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 &lt;<a href=3D3D"mailto:
> fin@anthi=
> > ve.com
> >> ">fin@a=3D
> >> >> nthive.com</a>&gt; 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&#39;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 &quot;/home/me/fin/beancount/stmon/export.py&quot;,
> lin=
> > e
> >> 373, i=3D
> >> >> n &lt;module&gt;<br>
> >> >>=3DC2=3DA0 =3DC2=3DA0 main()<br>
> >> >>=3DC2=3DA0 File &quot;/home/me/fin/beancount/stmon/export.py&quot;,
> 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 &quot;/home/me/fin/beancount/stmon/export.py&quot;,
> 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 &quot;/home/me/fin/beancount/stmon/export.py&quot;,
> lin=
> > e
> >> 373, i=3D
> >> >> n &lt;module&gt;<br>
> >> >>=3DC2=3DA0 =3DC2=3DA0 main()<br>
> >> >>=3DC2=3DA0 File &quot;/home/me/fin/beancount/stmon/export.py&quot;,
> lin=
> > e
> >> 300, i=3D
> >> >> n main<br>
> >> >>=3DC2=3DA0 =3DC2=3DA0 validate_entries(entries)<br>
> >> >>=3DC2=3DA0 File &quot;/home/me/fin/beancount/stmon/export.py&quot;,
> 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 &#39;beancount.core.flags&#39; has no
> attribute
> >> &#39=3D
> >> >> ;FLAG_UNREALIZED&#39;<br>
> >> >><br>
> >> >><br>
> >> >>=3DC2=3DA0 In either case I&#39;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&quot; 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&quot; 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 &lt;<a href=3D"mailto:
> fin@an=
> > thive.com">f...@anthive.com</a>&gt; 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>
> > &quot;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&#39;m not sure anyone&#39;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&#39;m using the export
> scrip=
> > t regularly to sync my aggregates and stock exposure to a Google Sheets
> doc=
> >  which reflects intraday changes).&quot;<br>
> ><br>
> ><br>
> >=C2=A0 fin<br>
> ><br>
> ><br>
> > &gt; Martin Blais wrote:<br>
> > &gt;<br>
> > &gt;=C2=A0 =C2=A0Martin, correct, it is a script referenced from
> beangrow<b=
> > r>
> > &gt; via the following text:<br>
> > &gt;<br>
> > &gt; &quot;(Finally, note that if all you need is a snapshot of your
> curren=
> > t positions, that&#39;s already handled by the export script.)&quot;
> which =
> > points at:<br>
> > &gt;<br>
> > &gt;=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>
> > &gt;<br>
> > &gt;=C2=A0 =C2=A0since it is doing pretty much most of what i wanted it
> to =
> > do<br>
> > &gt; i was hoping to take it and adapt it to a project i&#39;m
> working<br>
> > &gt; on.=C2=A0 i didn&#39;t want to reinvent the wheel of having to
> figure<=
> > br>
> > &gt; out how to load all my transactions, apply all the plugins,<br>
> > &gt; and then have to calculate the positions via going through<br>
> > &gt; all the transactions and adjusting lots, etc. of trades<br>
> > &gt; through all the years.<br>
> > &gt;<br>
> > &gt;=C2=A0 =C2=A0fin<br>
> > &gt;<br>
> > &gt;<br>
> > &gt;&gt; --0000000000005b869d06283d9823<br>
> > &gt;&gt; Content-Type: text/plain; charset=3D&quot;UTF-8&quot;<br>
> > &gt;&gt; Content-Transfer-Encoding: quoted-printable<br>
> > &gt;&gt;<br>
> > &gt;&gt; I think you&#39;re using some obsolete code. I don&#39;t see
> this =
> > on the master<br>
> > &gt;&gt; branch.<br>
> > &gt;&gt;<br>
> > &gt;&gt;<br>
> > &gt;&gt; On Sun, Dec 1, 2024 at 4:05=3DE2=3D80=3DAFPM fin &lt;<a
> href=3D"ma=
> > ilto:f...@anthive.com" target=3D"_blank">f...@anthive.com</a>&gt;
> wrote:<br>
> > &gt;&gt;<br>
> > &gt;&gt;&gt;<br>
> > &gt;&gt;&gt; Hello all,<br>
> > &gt;&gt;&gt;<br>
> > &gt;&gt;&gt;<br>
> > &gt;&gt;&gt;=C2=A0 =C2=A0I&#39;m trying to get this script to run and
> getti=
> > ng errors<br>
> > &gt;&gt;&gt;<br>
> > &gt;&gt;&gt;<br>
> > &gt;&gt;&gt;=C2=A0 =C2=A0For version from 2.3.6 I get:<br>
> > &gt;&gt;&gt;<br>
> > &gt;&gt;&gt;<br>
> > &gt;&gt;&gt; (bc) me@ant(14)~/fin/beancount/stmon$ python export.py
> ledger.=
> > bc -c fin<br>
> > &gt;&gt;&gt; INFO=C2=A0 =C2=A0 : Operating currency: USD<br>
> > &gt;&gt;&gt; Traceback (most recent call last):<br>
> > &gt;&gt;&gt;=C2=A0 =C2=A0File
> &quot;/home/me/fin/beancount/stmon/export.py&=
> > quot;, line 373, in &lt;module&gt;<br>
> > &gt;&gt;&gt;=C2=A0 =C2=A0 =C2=A0main()<br>
> > &gt;&gt;&gt;=C2=A0 =C2=A0File
> &quot;/home/me/fin/beancount/stmon/export.py&=
> > quot;, line 359, in main<br>
> > &gt;&gt;&gt;=C2=A0 =C2=A0 =C2=A0final_table =3D3D
> reorder_columns(joined_ta=
> > ble, headers)<br>
> > &gt;&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
> =C2=A0 =
> >=C2=A0^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^<br>
> > &gt;&gt;&gt;=C2=A0 =C2=A0File
> &quot;/home/me/fin/beancount/stmon/export.py&=
> > quot;, line 247, in<br>
> > &gt;&gt;&gt; reorder_columns<br>
> > &gt;&gt;&gt;=C2=A0 =C2=A0 =C2=A0rows =3D3D [[row[index] for index in
> indexe=
> > s] for row in table.rows]<br>
> > &gt;&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
> ~~~^^^^^^^<br>
> > &gt;&gt;&gt; IndexError: list index out of range<br>
> > &gt;&gt;&gt;<br>
> > &gt;&gt;&gt;<br>
> > &gt;&gt;&gt;=C2=A0 =C2=A0For version from current master (3.1.0.dev0) I
> get=
> >:<br>
> > &gt;&gt;&gt;<br>
> > &gt;&gt;&gt;<br>
> > &gt;&gt;&gt; (bc) me@ant(17)~/fin/beancount/stmon$ python export.py
> ledger.=
> > bc -c fin<br>
> > &gt;&gt;&gt; Traceback (most recent call last):<br>
> > &gt;&gt;&gt;=C2=A0 =C2=A0File
> &quot;/home/me/fin/beancount/stmon/export.py&=
> > quot;, line 373, in &lt;module&gt;<br>
> > &gt;&gt;&gt;=C2=A0 =C2=A0 =C2=A0main()<br>
> > &gt;&gt;&gt;=C2=A0 =C2=A0File
> &quot;/home/me/fin/beancount/stmon/export.py&=
> > quot;, line 300, in main<br>
> > &gt;&gt;&gt;=C2=A0 =C2=A0 =C2=A0validate_entries(entries)<br>
> > &gt;&gt;&gt;=C2=A0 =C2=A0File
> &quot;/home/me/fin/beancount/stmon/export.py&=
> > quot;, line 48, in<br>
> > &gt;&gt;&gt; validate_entries<br>
> > &gt;&gt;&gt;=C2=A0 =C2=A0 =C2=A0if entry.flag =3D3D=3D3D
> flags.FLAG_UNREALI=
> > ZED:<br>
> > &gt;&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
> =C2=A0 =
> >=C2=A0 =C2=A0 ^^^^^^^^^^^^^^^^^^^^^<br>
> > &gt;&gt;&gt; AttributeError: module &#39;beancount.core.flags&#39; has
> no a=
> > ttribute<br>
> > &gt;&gt;&gt; &#39;FLAG_UNREALIZED&#39;<br>
> > &gt;&gt;&gt;<br>
> > &gt;&gt;&gt;<br>
> > &gt;&gt;&gt;=C2=A0 =C2=A0In either case I&#39;m not a python guru yet
> enoug=
> > h to figure out<br>
> > &gt;&gt;&gt; what I am up against.=C2=A0 When I examine indexes and
> table.r=
> > ows things<br>
> > &gt;&gt;&gt; look ok to me.<br>
> > &gt;&gt;&gt;<br>
> > &gt;&gt;&gt;=C2=A0 =C2=A0Thanks for any clues.<br>
> > &gt;&gt;&gt;<br>
> > &gt;&gt;&gt;<br>
> > &gt;&gt;&gt;=C2=A0 =C2=A0fin<br>
> > &gt;&gt;&gt;<br>
> > &gt;&gt;&gt; --<br>
> > &gt;&gt;&gt; You received this message because you are subscribed to the
> Go=
> > ogle Groups<br>
> > &gt;&gt;&gt; &quot;Beancount&quot; group.<br>
> > &gt;&gt;&gt; To unsubscribe from this group and stop receiving emails
> from =
> > it, send an<br>
> > &gt;&gt;&gt; email to <a href=3D"mailto:
> beancount%2Bunsubscribe@googlegroup=
> > s.com" target=3D"_blank">beancount+unsubscr...@googlegroups.com</a>.<br>
> > &gt;&gt;&gt; To view this discussion visit<br>
> > &gt;&gt;&gt; <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>
> > &gt;&gt;&gt;<br>
> > &gt;&gt;<br>
> > &gt;&gt; --=3D20<br>
> > &gt;&gt; You received this message because you are subscribed to the
> Google=
> >  Groups &quot;=3D<br>
> > &gt;&gt; Beancount&quot; group.<br>
> > &gt;&gt; To unsubscribe from this group and stop receiving emails from
> it, =
> > send an e=3D<br>
> > &gt;&gt; mail to <a href=3D"mailto:
> beancount%2bunsubscr...@googlegroups.com=
> > " target=3D"_blank">beancount+unsubscr...@googlegroups.com</a>.<br>
> > &gt;&gt; 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>
> > &gt;&gt; AK21%2BhOpTmwt_NXotobGfZOrgLdb4LWd%2BPZJZxUzx8rCjpiEag%<a
> href=3D"=
> > http://40mail.gmail.com"; rel=3D"noreferrer"
> target=3D"_blank">40mail.gmail.=
> > com</a>.<br>
> > &gt;&gt;<br>
> > &gt;&gt; --0000000000005b869d06283d9823<br>
> > &gt;&gt; Content-Type: text/html; charset=3D&quot;UTF-8&quot;<br>
> > &gt;&gt; Content-Transfer-Encoding: quoted-printable<br>
> > &gt;&gt;<br>
> > &gt;&gt;&lt;div dir=3D3D&quot;ltr&quot;&gt;&lt;div
> class=3D3D&quot;gmail_de=
> > fault&quot; style=3D3D&quot;font-family:arial,sa=3D<br>
> > &gt;&gt; ns-serif;font-size:small&quot;&gt;I think you&amp;#39;re using
> som=
> > e obsolete code. I do=3D<br>
> > &gt;&gt; n&amp;#39;t see this on the master branch.&lt;/div&gt;&lt;div
> clas=
> > s=3D3D&quot;gmail_default&quot; st=3D<br>
> > &gt;&gt;
> yle=3D3D&quot;font-family:arial,sans-serif;font-size:small&quot;&g=
> > t;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;&lt;d=3D<br>
> > &gt;&gt; iv class=3D3D&quot;gmail_quote&quot;&gt;&lt;div
> dir=3D3D&quot;ltr&=
> > quot; class=3D3D&quot;gmail_attr&quot;&gt;On Sun, Dec =3D<br>
> > &gt;&gt; 1, 2024 at 4:05=3DE2=3D80=3DAFPM fin &amp;lt;&lt;a
> href=3D3D&quot;=
> > mailto:<a href=3D"mailto:f...@anthive.com"; target=3D"_blank">
> f...@anthive.com=
> ></a>&quot;&gt;fin@a=3D<br>
> > &gt;&gt; <a href=3D"http://nthive.com"; rel=3D"noreferrer"
> target=3D"_blank"=
> >>nthive.com</a>&lt;/a&gt;&amp;gt;
> wrote:&lt;br&gt;&lt;/div&gt;&lt;blockquot=
> > e class=3D3D&quot;gmail_quote&quot; style=3D<br>
> > &gt;&gt;=3D3D&quot;margin:0px 0px 0px 0.8ex;border-left:1px solid
> rgb(204,2=
> > 04,204);padding=3D<br>
> > &gt;&gt; -left:1ex&quot;&gt;&lt;br&gt;<br>
> > &gt;&gt; Hello all,&lt;br&gt;<br>
> > &gt;&gt;&lt;br&gt;<br>
> > &gt;&gt;&lt;br&gt;<br>
> > &gt;&gt;=3DC2=3DA0 I&amp;#39;m trying to get this script to run and
> getting=
> >  errors&lt;br&gt;<br>
> > &gt;&gt;&lt;br&gt;<br>
> > &gt;&gt;&lt;br&gt;<br>
> > &gt;&gt;=3DC2=3DA0 For version from 2.3.6 I get:&lt;br&gt;<br>
> > &gt;&gt;&lt;br&gt;<br>
> > &gt;&gt;&lt;br&gt;<br>
> > &gt;&gt; (bc) me@ant(14)~/fin/beancount/stmon$ python export.py
> ledger.bc -=
> > c fin&lt;br&gt;<br>
> > &gt;&gt; INFO=3DC2=3DA0 =3DC2=3DA0 : Operating currency:
> USD&lt;br&gt;<br>
> > &gt;&gt; Traceback (most recent call last):&lt;br&gt;<br>
> > &gt;&gt;=3DC2=3DA0 File
> &amp;quot;/home/me/fin/beancount/stmon/export.py&am=
> > p;quot;, line 373, i=3D<br>
> > &gt;&gt; n &amp;lt;module&amp;gt;&lt;br&gt;<br>
> > &gt;&gt;=3DC2=3DA0 =3DC2=3DA0 main()&lt;br&gt;<br>
> > &gt;&gt;=3DC2=3DA0 File
> &amp;quot;/home/me/fin/beancount/stmon/export.py&am=
> > p;quot;, line 359, i=3D<br>
> > &gt;&gt; n main&lt;br&gt;<br>
> > &gt;&gt;=3DC2=3DA0 =3DC2=3DA0 final_table =3D3D
> reorder_columns(joined_tabl=
> > e, headers)&lt;br&gt;<br>
> > &gt;&gt;=3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0
> =3DC2=3DA0 =
> >=3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 ^^^^^^^^^^^^=3D<br>
> > &gt;&gt; ^^^^^^^^^^^^^^^^^^^^^^^^^^&lt;br&gt;<br>
> > &gt;&gt;=3DC2=3DA0 File
> &amp;quot;/home/me/fin/beancount/stmon/export.py&am=
> > p;quot;, line 247, i=3D<br>
> > &gt;&gt; n reorder_columns&lt;br&gt;<br>
> > &gt;&gt;=3DC2=3DA0 =3DC2=3DA0 rows =3D3D [[row[index] for index in
> indexes]=
> >  for row in table.=3D<br>
> > &gt;&gt; rows]&lt;br&gt;<br>
> > &gt;&gt;=3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0
> =3DC2=3DA0 =
> >=3DC2=3DA0~~~^^^^^^^&lt;br&gt;<br>
> > &gt;&gt; IndexError: list index out of range&lt;br&gt;<br>
> > &gt;&gt;&lt;br&gt;<br>
> > &gt;&gt;&lt;br&gt;<br>
> > &gt;&gt;=3DC2=3DA0 For version from current master (3.1.0.dev0) I
> get:&lt;b=
> > r&gt;<br>
> > &gt;&gt;&lt;br&gt;<br>
> > &gt;&gt;&lt;br&gt;<br>
> > &gt;&gt; (bc) me@ant(17)~/fin/beancount/stmon$ python export.py
> ledger.bc -=
> > c fin&lt;br&gt;<br>
> > &gt;&gt; Traceback (most recent call last):&lt;br&gt;<br>
> > &gt;&gt;=3DC2=3DA0 File
> &amp;quot;/home/me/fin/beancount/stmon/export.py&am=
> > p;quot;, line 373, i=3D<br>
> > &gt;&gt; n &amp;lt;module&amp;gt;&lt;br&gt;<br>
> > &gt;&gt;=3DC2=3DA0 =3DC2=3DA0 main()&lt;br&gt;<br>
> > &gt;&gt;=3DC2=3DA0 File
> &amp;quot;/home/me/fin/beancount/stmon/export.py&am=
> > p;quot;, line 300, i=3D<br>
> > &gt;&gt; n main&lt;br&gt;<br>
> > &gt;&gt;=3DC2=3DA0 =3DC2=3DA0 validate_entries(entries)&lt;br&gt;<br>
> > &gt;&gt;=3DC2=3DA0 File
> &amp;quot;/home/me/fin/beancount/stmon/export.py&am=
> > p;quot;, line 48, in=3D<br>
> > &gt;&gt;=C2=A0 validate_entries&lt;br&gt;<br>
> > &gt;&gt;=3DC2=3DA0 =3DC2=3DA0 if entry.flag =3D3D=3D3D
> flags.FLAG_UNREALIZE=
> > D:&lt;br&gt;<br>
> > &gt;&gt;=3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0
> =3DC2=3DA0 =
> >=3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3DA0 =3DC2=3D<br>
> > &gt;&gt;=3DA0^^^^^^^^^^^^^^^^^^^^^&lt;br&gt;<br>
> > &gt;&gt; AttributeError: module &amp;#39;beancount.core.flags&amp;#39;
> has =
> > no attribute &amp;#39=3D<br>
> > &gt;&gt; ;FLAG_UNREALIZED&amp;#39;&lt;br&gt;<br>
> > &gt;&gt;&lt;br&gt;<br>
> > &gt;&gt;&lt;br&gt;<br>
> > &gt;&gt;=3DC2=3DA0 In either case I&amp;#39;m not a python guru yet
> enough =
> > to figure out&lt;br=3D<br>
> > &gt;&gt;&gt;<br>
> > &gt;&gt; what I am up against.=3DC2=3DA0 When I examine indexes and
> table.r=
> > ows things&lt;br=3D<br>
> > &gt;&gt;&gt;<br>
> > &gt;&gt; look ok to me.&lt;br&gt;<br>
> > &gt;&gt;&lt;br&gt;<br>
> > &gt;&gt;=3DC2=3DA0 Thanks for any clues.&lt;br&gt;<br>
> > &gt;&gt;&lt;br&gt;<br>
> > &gt;&gt;&lt;br&gt;<br>
> > &gt;&gt;=3DC2=3DA0 fin&lt;br&gt;<br>
> > &gt;&gt;&lt;br&gt;<br>
> > &gt;&gt; -- &lt;br&gt;<br>
> > &gt;&gt; You received this message because you are subscribed to the
> Google=
> >  Groups &amp;=3D<br>
> > &gt;&gt; quot;Beancount&amp;quot; group.&lt;br&gt;<br>
> > &gt;&gt; To unsubscribe from this group and stop receiving emails from
> it, =
> > send an e=3D<br>
> > &gt;&gt; mail to &lt;a href=3D3D&quot;mailto:<a href=3D"mailto:
> beancount%25=
> > 2bunsubscr...@googlegroups.com"
> target=3D"_blank">beancount%2Bunsubscribe@g=
> > ooglegroups.com</a>&quot; target=3D<br>
> > &gt;&gt;=3D3D&quot;_blank&quot;&gt;<a href=3D"mailto:
> beancount%2Bunsubscrib=
> > e...@googlegroups.com" target=3D"_blank">
> beancount+unsubscr...@googlegroups.co=
> > m</a>&lt;/a&gt;.&lt;br&gt;<br>
> > &gt;&gt; To view this discussion visit &lt;a href=3D3D&quot;<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>
> > &gt;&gt; beancount/bjvu1l-75k.ln1%<a href=3D"http://40anthive.com";
> rel=3D"n=
> > oreferrer" target=3D"_blank">40anthive.com</a>&quot;
> rel=3D3D&quot;noreferr=
> > er&quot; target=3D3D&quot;_blank=3D<br>
> > &gt;&gt; &quot;&gt;<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>&lt;=3D<=
> > br>
> > &gt;&gt; /a&gt;.&lt;br&gt;<br>
> > &gt;&gt;&lt;/blockquote&gt;&lt;/div&gt;<br>
> > &gt;&gt;<br>
> > &gt;&gt;&lt;p&gt;&lt;/p&gt;<br>
> > &gt;&gt;<br>
> > &gt;&gt; -- &lt;br /&gt;<br>
> > &gt;&gt; You received this message because you are subscribed to the
> Google=
> >  Groups &amp;=3D<br>
> > &gt;&gt; quot;Beancount&amp;quot; group.&lt;br /&gt;<br>
> > &gt;&gt; To unsubscribe from this group and stop receiving emails from
> it, =
> > send an e=3D<br>
> > &gt;&gt; mail to &lt;a href=3D3D&quot;mailto:<a href=3D"mailto:
> beancount%2B=
> > unsubscr...@googlegroups.com"
> target=3D"_blank">beancount+unsubscribe@googl=
> > egroups.com</a>&quot;&gt;beancount=3D<br>
> > &gt;&gt; +<a href=3D"mailto:unsubscr...@googlegroups.com";
> target=3D"_blank"=
> >>unsubscr...@googlegroups.com</a>&lt;/a&gt;.&lt;br /&gt;<br>
> > &gt;&gt; To view this discussion visit &lt;a href=3D3D&quot;<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>
> > &gt;&gt;
> beancount/CAK21%2BhOpTmwt_NXotobGfZOrgLdb4LWd%2BPZJZxUzx8rCjpiEag%=
> ><a href=3D"http://40mail.gm"; rel=3D"noreferrer" target=3D"_blank">
> 40mail.gm=
> ></a>=3D<br>
> > &gt;&gt; <a href=3D"
> http://ail.com?utm_medium=3D3Demail&amp;utm_source=3D3D=
> > footer" rel=3D"noreferrer" target=3D"_blank">
> ail.com?utm_medium=3D3Demail&a=
> > mp;utm_source=3D3Dfooter</a>&quot;&gt;<a href=3D"
> https://groups.google.com/=
> > d=3D" rel=3D"noreferrer" target=3D"_blank">
> https://groups.google.com/d=3D</=
> > a><br>
> > &gt;&gt;
> /msgid/beancount/CAK21%2BhOpTmwt_NXotobGfZOrgLdb4LWd%2BPZJZxUzx8rC=
> > jpiEag%40=3D<br>
> > &gt;&gt; <a href=3D"http://mail.gmail.com"; rel=3D"noreferrer"
> target=3D"_bl=
> > ank">mail.gmail.com</a>&lt;/a&gt;.&lt;br /&gt;<br>
> > &gt;&gt;<br>
> > &gt;&gt; --0000000000005b869d06283d9823--<br>
> > &gt;&gt;<br>
> > &gt;<br>
> ><br>
> > -- <br>
> > You received this message because you are subscribed to the Google
> Groups &=
> > quot;Beancount&quot; 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&quot; 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.

Reply via email to