gateway icon indicating copy to clipboard operation
gateway copied to clipboard

Gateway - Unable to setup connector due to Unhandled Error

Open rapcmia opened this issue 9 months ago • 3 comments

Describe the bug

While testing a pull request and tried to compare a behavior found when setting up a amm connector, a unhandled error occurred after gateway connect connector-name was executed

Image

2025-03-19 10:22:45,163 - 246310 - hummingbot.client.hummingbot_application - ERROR - MQTT is already stopped!
2025-03-19 10:39:52,178 - 252190 - hummingbot.core.gateway.gateway_status_monitor - INFO - Gateway Service is ONLINE.
2025-03-19 10:40:06,755 - 252190 - hummingbot.core.utils.async_utils - ERROR - Unhandled error in background task: 'trading_type'
Traceback (most recent call last):
  File "/home/yawnyunehh/hummingbot/hummingbot/dev/hummingbot/core/utils/async_utils.py", line 9, in safe_wrapper
    return await c
  File "/home/yawnyunehh/hummingbot/hummingbot/dev/hummingbot/client/command/gateway_command.py", line 236, in _gateway_connect
    trading_type: str = connector_config[0]["trading_type"][0]
KeyError: 'trading_type'

Steps to reproduce

  1. Setup a development ver of both hummingbot and gateway on source
  2. After successfully connected, run command gateway connect branch-name

Release version

dev-2.5.0

Type of installation

Source

Attach required files

No response

rapcmia avatar Mar 19 '25 02:03 rapcmia

@rapcmia I think this is an outdated version of Hummingbot, since it shouldn't be trading_type anymore.

The code in development branch in https://github.com/hummingbot/hummingbot/blob/development/hummingbot/client/command/gateway_command.py#L242 references trading_types, which is the correct variable name.

fengtality avatar Apr 11 '25 14:04 fengtality

Hi @fengtality ahh yes im using the latest commit 0a03049f38151245046ea25b70c588121fa9538b and confirmed that the trading_types are the same. This only happens on my MacOs but linux is okay on fresh installs (3/3 attempt and remove env to make sure) 🙏🏼

Image

rapcmia avatar Apr 11 '25 15:04 rapcmia

I'm facing the same issue when trying to gateway connect jupiter from Hummingbot CLI.

Setup:

  • WSL on Windows (Ubuntu 22.04)
  • Gateway built from latest development branch
  • Node.js v22.14 with pnpm
  • Hummingbot connects fine to Binance spot

Error:

2025-04-18 21:18:20,938 - 92692 - hummingbot.core.utils.async_utils - ERROR - Unhandled error in background task: 'trading_type' Traceback (most recent call last): File "/home/user/hummingbot/hummingbot/core/utils/async_utils.py", line 9, in safe_wrapper return await c File "/home/user/hummingbot/hummingbot/client/command/gateway_command.py", line 236, in _gateway_connect trading_type: str = connector_config[0]["trading_type"][0] KeyError: 'trading_type'

selyami-angelov avatar Apr 19 '25 05:04 selyami-angelov