这是indexloc提供的服务,不要输入任何密码
Skip to content

Arbitrage controller - unsupported operand type(s) for /: 'decimal.Decimal' and 'NoneType' #7395

@rapcmia

Description

@rapcmia

Describe the bug

When running test for uniswap on polygon network, our strategy kept on failing on this error when it have similar setup from other networks
Image

2025-01-27 17:36:54,605 - 471807 - hummingbot.client.hummingbot_application - INFO - start command initiated.
2025-01-27 17:36:54,669 - 471807 - GatewayEthereumAMM - INFO - Network status has changed to NetworkStatus.CONNECTED. Starting networking...
2025-01-27 17:36:54,999 - 471807 - hummingbot.connector.exchange.kucoin.kucoin_exchange.KucoinExchange - INFO - Network status has changed to NetworkStatus.CONNECTED. Starting networking...
2025-01-27 17:36:55,001 - 471807 - hummingbot.strategy.script_strategy_base - WARNING - uniswap_ethereum_polygon is not ready. Please wait...
2025-01-27 17:36:55,001 - 471807 - hummingbot.strategy.script_strategy_base - WARNING - kucoin is not ready. Please wait...
2025-01-27 17:36:55,364 - 471807 - hummingbot.core.data_type.order_book_tracker - INFO - Initialized order book for POL-USDT. 1/1 completed.
2025-01-27 17:36:55,979 - 471807 - hummingbot.connector.exchange.kucoin.kucoin_api_order_book_data_source.KucoinAPIOrderBookDataSource - INFO - Subscribed to public order book and trade channels...
2025-01-27 17:36:56,000 - 471807 - hummingbot.strategy.script_strategy_base - WARNING - uniswap_ethereum_polygon is not ready. Please wait...
2025-01-27 17:36:56,000 - 471807 - hummingbot.strategy.script_strategy_base - WARNING - kucoin is not ready. Please wait...
2025-01-27 17:36:56,080 - 471807 - hummingbot.connector.exchange.kucoin.kucoin_api_user_stream_data_source.KucoinAPIUserStreamDataSource - INFO - Subscribed to private order changes and balance updates channels...
2025-01-27 17:36:57,001 - 471807 - hummingbot.strategy.script_strategy_base - WARNING - uniswap_ethereum_polygon is not ready. Please wait...
2025-01-27 17:36:57,625 - 471807 - hummingbot.strategy_v2.runnable_base - ERROR - Error creating executor to buy on uniswap_ethereum_polygon and sell on kucoin, unsupported operand type(s) for /: 'decimal.Decimal' and 'NoneType'
2025-01-27 17:36:57,626 - 471807 - hummingbot.strategy_v2.runnable_base - ERROR - Error creating executor to buy on kucoin and sell on uniswap_ethereum_polygon, unsupported operand type(s) for /: 'decimal.Decimal' and 'NoneType'
2025-01-27 17:36:57,626 - 471807 - hummingbot.strategy.script_strategy_base - ERROR - Error executing action: 'NoneType' object has no attribute 'controller_id'
Traceback (most recent call last):
  File "/home/rapcomia/github/hummingbot/hummingbot/7367/hummingbot/strategy/strategy_v2_base.py", line 248, in listen_to_executor_actions
    self.executor_orchestrator.execute_actions(actions)
  File "/home/rapcomia/github/hummingbot/hummingbot/7367/hummingbot/strategy_v2/executors/executor_orchestrator.py", line 111, in execute_actions
    self.execute_action(action)
  File "/home/rapcomia/github/hummingbot/hummingbot/7367/hummingbot/strategy_v2/executors/executor_orchestrator.py", line 93, in execute_action
    controller_id = action.controller_id
AttributeError: 'NoneType' object has no attribute 'controller_id'
  • Observed that there are no errors on gateway and seems failing on hummingbot ❌

Steps to reproduce

  1. Setup hummingbot and gateway core PR test / gateway-core-connectors #7367
  2. Connect to polygon network from gateway connect uniswap
  3. Setup a simple arbitrage_controller on v2 strategy then start

Release version

dev-2.3.0

Type of installation

Source

Attach required files

01272025.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions