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 beancount+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/CAGQ70etbHO%2BAoBHK9-A5tehOATGozm6A7xn2wYb7KOLhgzswuQ%40mail.gmail.com.