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

PullOracleHandler: Error calling contract: Cannot convert None of type <class 'NoneType'> to bytes #24

Open
dandagow3t opened this issue Feb 2, 2025 · 0 comments

Comments

@dandagow3t
Copy link

dandagow3t commented Feb 2, 2025

Error in the logs:

2025-02-02 18:48:29,203 - ERROR - PullOracleHandler: Error calling contract: Cannot convert None of type <class 'NoneType'> to bytes
(<class 'TypeError'>, TypeError("Cannot convert None of type <class 'NoneType'> to bytes"), <traceback object at 0x7edfe0207b80>)
Traceback (most recent call last):
  File "/home/admin/liq-bot-v2/app/liquidation/liquidation_bot.py", line 856, in get_feed_ids
    asset_list = [Vault(collateral_vault, config).underlying_asset_address
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/admin/liq-bot-v2/app/liquidation/liquidation_bot.py", line 54, in __init__
    self.underlying_asset_address = self.instance.functions.asset().call()
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/admin/liq-bot-v2/venv/lib/python3.12/site-packages/web3/contract/contract.py", line 305, in call
    return call_contract_function(
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/admin/liq-bot-v2/venv/lib/python3.12/site-packages/web3/contract/utils.py", line 96, in call_contract_function
    return_data = w3.eth.call(
                  ^^^^^^^^^^^^
  File "/home/admin/liq-bot-v2/venv/lib/python3.12/site-packages/web3/eth/eth.py", line 260, in call
    return self._durin_call(transaction, block_identifier, state_override)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/admin/liq-bot-v2/venv/lib/python3.12/site-packages/web3/eth/eth.py", line 279, in _durin_call
    return self._call(transaction, block_identifier, state_override)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/admin/liq-bot-v2/venv/lib/python3.12/site-packages/web3/module.py", line 78, in caller
    return apply_result_formatters(result_formatters, result)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "cytoolz/functoolz.pyx", line 267, in cytoolz.functoolz.curry.__call__
  File "cytoolz/functoolz.pyx", line 263, in cytoolz.functoolz.curry.__call__
  File "/home/admin/liq-bot-v2/venv/lib/python3.12/site-packages/web3/module.py", line 49, in apply_result_formatters
    formatted_result = pipe(result, result_formatters)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "cytoolz/functoolz.pyx", line 680, in cytoolz.functoolz.pipe
  File "cytoolz/functoolz.pyx", line 655, in cytoolz.functoolz.c_pipe
  File "/home/admin/liq-bot-v2/venv/lib/python3.12/site-packages/hexbytes/main.py", line 42, in __new__
    bytesval = to_bytes(val)
               ^^^^^^^^^^^^^
  File "/home/admin/liq-bot-v2/venv/lib/python3.12/site-packages/hexbytes/_utils.py", line 32, in to_bytes
    raise TypeError(f"Cannot convert {val!r} of type {type(val)} to bytes")
TypeError: Cannot convert None of type <class 'NoneType'> to bytes

2025-02-02 18:48:29,204 - ERROR - Vault: Failed to get account liquidity for account 0x8A25d8c9FA8c7a726137f2d618d85CBC2C083f79: Contract error - cannot unpack non-iterable NoneType object
None
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