-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Description
I got the following error when trying to run with the latest Ledger Live exports.
ERROR: Fatal exception occurred:
Traceback (most recent call last):
File "/home/user/.local/lib/python3.10/site-packages/dali/dali_main.py", line 168, in _dali_main_internal
result_list = pool.map(_input_plugin_helper, input_plugin_args_list)
File "/usr/lib/python3.10/multiprocessing/pool.py", line 367, in map
return self._map_async(func, iterable, mapstar, chunksize).get()
File "/usr/lib/python3.10/multiprocessing/pool.py", line 774, in get
raise self._value
File "/usr/lib/python3.10/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "/usr/lib/python3.10/multiprocessing/pool.py", line 48, in mapstar
return list(map(*args))
File "/home/user/.local/lib/python3.10/site-packages/dali/dali_main.py", line 226, in _input_plugin_helper
plugin_transactions = input_plugin.load(country)
File "/home/user/.local/lib/python3.10/site-packages/dali/plugin/input/csv/ledger.py", line 107, in load
quantity_number: RP2Decimal = RP2Decimal(line[self.__QUANTITY_INDEX])
decimal.InvalidOperation: [<class 'decimal.ConversionSyntax'>]
I was able to fix it by removing the status column from the new csv exports.
The new header in the ledger csv export is the following:
Operation Date, Status, Currency Ticker, Operation Type, Operation Amount, Operation Fees, Operation Hash, Account Name, Account xpub, Countervalue Ticker, Countervalue at Operation Date, Countervalue at CSV Export
I believe the code at:
| class InputPlugin(AbstractInputPlugin): |
I believe the fix for this should be something along the lines of:
class InputPlugin(AbstractInputPlugin):
__LEDGER: str = "Ledger"
__TIMESTAMP_INDEX: int = 0
__CURRENCY_INDEX: int = 2
__OPERATION_TYPE_INDEX: int = 3
__QUANTITY_INDEX: int = 4
__FEE_INDEX: int = 5
__TRANSACTION_ID_INDEX: int = 6
__DELIMITER = ","
__CURRENCY_ALIAS_DICT = {
"FANTOM": "FTM",
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels