On Monday, August 14, 2017 at 7:59:54 PM UTC-7, John Wiegley wrote:
>
>
> There should be a 'ledger.session', package global variable you can use.
>
>
Thanks.
Unfortunately, ledger.session.close_journal_files() Segmentation faults
when I use
it as I would like to use it. If I do a ledger.read_journal() followed
immediately by
ledger.session.close_journal_files(), it does *not* Segmentation fault.
But when I
do a journal.query() before the ledger.session.close_journal_files(), it
faults:
(Pdb) l
> 85 if date:
> 86 qal.extend(['-e', date])
> 87 qal.append('^assets')
> 88 journalx = ledger.read_journal(parameters.fpn_journal)
> 89 sym2name = dict()
> 90 -> for postx in journalx.query(' '.join(qal)):
> 91 if postx.amount.commodity.symbol != '$':
> 92 sym2name[postx.amount.commodity.symbol] =
> str(postx.account)
> 93 ledger.session.close_journal_files()
> 94 return sym2name
> 95 #@+node:bob.20170807142056.12: ** main()
> (Pdb) b 93
> Breakpoint 2 at /pri/git/Ledger4/symbol2name.py:93
> (Pdb) c
> > /pri/git/Ledger4/symbol2name.py(93)symbol2name()
> -> ledger.session.close_journal_files()
> (Pdb) s
> Segmentation fault (core dumped)
>
The same thing happens when I set breakpoints at 93 and 94 and then
continue from 93.
That is, the problem has nothing to do with single stepping into
ledger.session.close_journal_files().
--
---
You received this message because you are subscribed to the Google Groups
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.