-
Notifications
You must be signed in to change notification settings - Fork 51
Description
I keep getting errors running rp2_us saying that various values are non-numerical (presumably str type based on the error). For example:
INFO: Country: us
INFO: Generation Language: en
INFO: Accounting method: hifo
INFO: Configuration file: rp2_config_2024_debug.ini
INFO: Input file: rp2_input_2024_debug5.ods
INFO: Processing ADA
INFO: Processing ALGO
ERROR: Fatal exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.11/dist-packages/rp2/ods_parser.py", line 258, in _process_constructor_argument_pack
argument_pack[numeric_parameter] = RP2Decimal(f"{value:.11f}") if value is not None else None
^^^^^^^^^^^^^^^
ValueError: Unknown format code 'f' for object of type 'str'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.11/dist-packages/rp2/rp2_main.py", line 151, in _rp2_main_internal
input_data: InputData = parse_ods(configuration=configuration, asset=asset, input_file_handle=input_file_handle)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/rp2/ods_parser.py", line 125, in parse_ods
_create_and_process_transaction(configuration, row_values, current_table_type, i + 1, unfiltered_transaction_sets, artificial_transaction_list)
File "/usr/local/lib/python3.11/dist-packages/rp2/ods_parser.py", line 161, in _create_and_process_transaction
transaction: AbstractTransaction = _create_transaction(configuration, current_table_type, internal_id, row_values)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/rp2/ods_parser.py", line 276, in _create_transaction
argument_pack = _process_constructor_argument_pack(configuration, argument_pack, internal_id, "InTransaction")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/rp2/ods_parser.py", line 260, in _process_constructor_argument_pack
raise RP2ValueError(f"Argument '{numeric_parameter}' has non-numeric value: {value}") from exc
rp2.rp2_error.RP2ValueError: Argument 'fiat_fee' has non-numeric value: 0.0
I have tried changed the cell types and re-entering the values manually in M365 online an Google Sheets and I keep coming back with the same error.
I get these errors while trying to big my first issue "Total in-transaction crypto value < total taxable crypto value" issues as reported in other discussions. I have manually added all the in IN transactions (buys and staking) and they are 0.7 greater than the single OUT (sell) transaction, so no idea what's going.
It's been about 25 hours of formatting input tables and trying to troubleshoot these issues, so this is my last shot before giving up and paying an exorbitant amount for a crypto tax aggregation service.
Perhaps the program would be less prone to these types of formatting or other errors if it was written to read in a single CSV transaction file without arbitrary tables and sheets for IN/OUT/INTRA and asset types. INTRA exchange/wallet transfers can easily be handled by matching Send and Receive transactions with the same ID.