Skip to content

Parameter 'crypto_fee' has zero value #101

Open
@splix

Description

@splix

rp2_us fails with error:

INFO: Country: us
INFO: Generation Language: en
INFO: Accounting method: fifo
INFO: Configuration file: ../reports/test_crypto_data.ini
INFO: Input file: ../reports/test_crypto_data.ods
INFO: Processing ETH
ERROR: Fatal exception occurred:
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/rp2/rp2_main.py", line 143, in _rp2_main_internal
    input_data: InputData = parse_ods(configuration=configuration, asset=asset, input_file_handle=input_file_handle)
  File "/usr/local/lib/python3.10/site-packages/rp2/ods_parser.py", line 127, in parse_ods
    _create_and_process_transaction(
  File "/usr/local/lib/python3.10/site-packages/rp2/ods_parser.py", line 166, in _create_and_process_transaction
    transaction: AbstractTransaction = _create_transaction(configuration, current_table_type, internal_id, row_values)
  File "/usr/local/lib/python3.10/site-packages/rp2/ods_parser.py", line 286, in _create_transaction
    transaction = OutTransaction(**argument_pack)
  File "/usr/local/lib/python3.10/site-packages/rp2/out_transaction.py", line 60, in __init__
    self.__crypto_fee = configuration.type_check_positive_decimal("crypto_fee", crypto_fee, non_zero=True)
  File "/usr/local/lib/python3.10/site-packages/rp2/configuration.py", line 468, in type_check_positive_decimal
    raise RP2ValueError(f"Parameter '{name}' has zero value")
rp2.rp2_error.RP2ValueError: Parameter 'crypto_fee' has zero value

I've checked the file and it doesn't have any line with zero value, but there are few lines with a very small value. That may be the reason, but anyway it's hard to find out where is the problem with such error message.

I suggest to include the actual string which rp2 failed to parse in the error message. And if it's possible the line number from the file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions