Re: Errors from run_query(), not from bean-query

2023-08-03 Thread Daniele Nicolodi
On 03/08/23 07:20, Eric Altendorf wrote: On Wed, Aug 2, 2023 at 5:55 PM Martin Blais > wrote: On Thu, Aug 3, 2023, 08:54 Martin Blais mailto:bl...@furius.ca>> wrote: Use bn.loader.load_file(), not just the parser. Beancount has two stages: parsing,

Re: Errors from run_query(), not from bean-query

2023-08-02 Thread Eric Altendorf
On Wed, Aug 2, 2023 at 5:55 PM Martin Blais wrote: > > On Thu, Aug 3, 2023, 08:54 Martin Blais wrote: > >> Use bn.loader.load_file(), not just the parser. >> Beancount has two stages: parsing, then booking and running all the >> plugins. >> Loading does both. >> The query is intended to be run

Re: Errors from run_query(), not from bean-query

2023-08-02 Thread Martin Blais
Btw, fwiw, the beanlabs repo has a bunch of random scripts you might find useful to eyeball, that use the api On Thu, Aug 3, 2023, 08:54 Martin Blais wrote: > Use bn.loader.load_file(), not just the parser. > Beancount has two stages: parsing, then booking and running all the > plugins. >

Re: Errors from run_query(), not from bean-query

2023-08-02 Thread Martin Blais
Use bn.loader.load_file(), not just the parser. Beancount has two stages: parsing, then booking and running all the plugins. Loading does both. The query is intended to be run on the output of the loader. On Thu, Aug 3, 2023, 08:21 Eric Altendorf wrote: > I'm getting errors inside

Errors from run_query(), not from bean-query

2023-08-02 Thread Eric Altendorf
I'm getting errors inside beancount/ops/summarize.py while using beanquery's run_query() programmatically. This is on a beancount ledger that works fine when I run bean-query from the command line. I'm not sure if I'm failing to use the programmatic API correctly or if there's something else