diff --git a/piker/accounting/_ledger.py b/piker/accounting/_ledger.py index b46b46ba..9c3f80a4 100644 --- a/piker/accounting/_ledger.py +++ b/piker/accounting/_ledger.py @@ -35,6 +35,7 @@ from pendulum import ( parse, ) import tomlkit +import tomli from .. import config from ..data.types import Struct @@ -141,8 +142,10 @@ class TransactionLedger(UserDict): if fqme: txdict['fqme'] = fqme + print(f'WRITING LEDGER {self.file_path}') with self.file_path.open(mode='w') as fp: tomlkit.dump(towrite, fp) + print(f'FINISHED WRITING LEDGER {self.file_path}') def update_from_t( self, diff --git a/piker/config.py b/piker/config.py index be77709f..b708e252 100644 --- a/piker/config.py +++ b/piker/config.py @@ -345,7 +345,7 @@ def load_ledger( with fpath.open(mode='rb') as cf: start = time.time() - ledger_dict = tomlkit.parse(cf.read()) + ledger_dict = tomllib.load(cf) log.debug(f'Ledger load took {time.time() - start}s') return ledger_dict, fpath