Just a consequence of using namedtuples. The next version won't require it
On Sat, May 8, 2021 at 9:40 AM Oon-Ee Ng <[email protected]> wrote: > So creating a new Transaction looks something like the below:- > > meta = data.new_metadata(file.name, lineno) > txn = data.Transaction( > meta, date, self.FLAG, None, description, > data.EMPTY_SET, data.EMPTY_SET, [ > data.Posting(account_name, amount_val, None, None, > None, None), > data.Posting(account_name_2, -amount_val, None, None, > None, None) > ] > ) > > If I don't specify metadata at all (use an empty dictionary) then it will > throw a KeyError from line 586 in core/data.py in entry_sortkey > > But if I just specify a nonsense value (identical across all transactions) > it works, and doesn't affect anything else. > > Does it make more sense not to require metadata at all when creating > Transactions? > > -- > 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 on the web visit > https://groups.google.com/d/msgid/beancount/CAGQ70etbHO%2BAoBHK9-A5tehOATGozm6A7xn2wYb7KOLhgzswuQ%40mail.gmail.com > <https://groups.google.com/d/msgid/beancount/CAGQ70etbHO%2BAoBHK9-A5tehOATGozm6A7xn2wYb7KOLhgzswuQ%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- 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 on the web visit https://groups.google.com/d/msgid/beancount/CAK21%2BhNkgQhLXWWpRW1aQD5XqaNyatH6GhhHxUDqoi5J_8ARSg%40mail.gmail.com.
