Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kraken API and unsupported type causes crash #285

Open
agrieco opened this issue Jan 25, 2025 · 0 comments
Open

Kraken API and unsupported type causes crash #285

agrieco opened this issue Jan 25, 2025 · 0 comments

Comments

@agrieco
Copy link

agrieco commented Jan 25, 2025

I've got some an older DOT staking transaction that is causing a crash.

2025-01-25 10:39:35,967/dali/INFO: Country: us
2025-01-25 10:39:35,972/dali/INFO: Initialized input plugin 'dali.plugin.input.rest.kraken'
2025-01-25 10:39:35,972/dali/INFO: No pair converter plugins found in configuration file: using default pair converters.
2025-01-25 10:39:35,986/dali/INFO: Reading crypto data using plugin 'dali.plugin.input.rest.kraken'
2025-01-25 10:41:55,268/kraken/ERROR: Unsupported transaction type: staking (skipping): {'aclass': 'currency', 'amount': '<REDACTED>', 'asset': 'DOT', 'balance': '<REDACTED>', 'fee': '<REDACTED>', 'refid': '<REDACTED>', 'time': '<REDACTED>', 'type': 'staking', 'subtype': ''}. Please open an issue at https://github.com/eprbell/dali-rp2/issues
2025-01-25 10:41:55,271/dali/ERROR: Fatal exception occurred:
Traceback (most recent call last):
  File "/opt/homebrew/lib/python3.11/site-packages/dali/dali_main.py", line 168, in _dali_main_internal
    result_list = pool.map(_input_plugin_helper, input_plugin_args_list)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.11.10/Frameworks/Python.framework/Versions/3.11/lib/python3.11/multiprocessing/pool.py", line 367, in map
    return self._map_async(func, iterable, mapstar, chunksize).get()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.11.10/Frameworks/Python.framework/Versions/3.11/lib/python3.11/multiprocessing/pool.py", line 774, in get
    raise self._value
  File "/opt/homebrew/Cellar/[email protected]/3.11.10/Frameworks/Python.framework/Versions/3.11/lib/python3.11/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
                    ^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.11.10/Frameworks/Python.framework/Versions/3.11/lib/python3.11/multiprocessing/pool.py", line 48, in mapstar
    return list(map(*args))
           ^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/dali/dali_main.py", line 226, in _input_plugin_helper
    plugin_transactions = input_plugin.load(country)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/dali/plugin/input/rest/kraken.py", line 211, in load
    return self._compute_transaction_set(trade_history, ledger)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/dali/plugin/input/rest/kraken.py", line 226, in _compute_transaction_set
    asset_base: str = self.base_id_to_base[record[_ASSET]]
                      ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
KeyError: 'DOT.S'
2025-01-25 10:41:55,275/dali/INFO: Log file: ./log/rp2_2025_01_25_10_39_35_459944.log
2025-01-25 10:41:55,275/dali/INFO: Generated output directory: output
2025-01-25 10:41:55,275/dali/INFO: Done

Any hints on how a change to help handle this more gracefully?

Thanks

Repository owner deleted a comment Jan 25, 2025
Repository owner deleted a comment Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant