跳转至内容

故障排除

安装

Docker:权限不足错误

docker: Got permission denied while trying to connect to the Docker daemon socket at
unix:///var/run/docker.sock...

上面的错误信息表明在尝试访问 Docker 守护进程套接字时出现权限问题。这是以非根用户身份运行 Docker 命令时的常见问题。要将您的用户添加到 docker 组,请使用以下命令:

sudo usermod -aG docker $USER

# 在运行上面的命令后重启终端,如果仍然不起作用,请尝试下面的命令

sudo chmod 666 /var/run/docker.sock

源码安装:找不到 conda 命令

$ conda
-bash: conda: command not found

确保已安装 Anaconda、Miniconda 或 Miniforge(适用于 arm64 系统)。如果您刚刚安装了它,请重启终端以刷新命令行环境。

源码安装:./install: line 40 ... 被终止

Collecting package metadata (repodata.json): / ./install: line 40: 14981 Killed...
此错误通常出现在 2GB 或更少内存的系统上安装期间。请将系统内存增加到至少 4GB,或者如果无法升级硬件,可以考虑添加交换文件。

源码安装:找不到 conda 环境:hummingbot

Alt text

这与上面的问题相关。检查运行./install脚本后是否有任何错误。如果有,您需要先解决这些问题,否则创建 hummingbot conda 环境将会失败。

源码安装:无法执行gcc: 没有该文件或目录

Alt text

如果出现此错误,您需要安装build-essential包。运行以下命令进行安装 -

sudo apt update && sudo apt upgrade -y && sudo apt install -y build-essential

仪表板

无法连接 MQTT 桥接:

00:21:16 - hummingbot_application - Failed to connect MQTT Bridge: 
[Errno 111] Connection refused. Retrying in 10.0 seconds.

如果出现此错误,通常意味着 Hummingbot Broker 没有运行,请从实例页面启动 Broker,然后重启所有 Hummingbot 客户端实例。

Docker 未运行。请启动 Docker 并刷新页面。

Alt text

确保您已安装 Docker。在 Windows 和 MacOS 机器上,请确保 Docker Desktop 在后台运行。

找不到名为 hummingbot 的模块

Alt text

注意:缺失的模块名称可能是其他模块,例如st_pages等。如果收到此消息,这意味着环境未正确安装。在终端中按以下步骤重新安装 -

conda deactivate
make env_remove
make env_create
conda activate dashboard
make run

仪表板中未显示身份验证页面

默认情况下,身份验证系统是禁用的。

CONFIG.py文件中找到变量AUTH_SYSTEM_ENABLED并将其设置为True以启用身份验证页面。

V1 策略

V2 策略

AttributeError: 'hummingbot.connector.exchange.kraken.kraken_exchan' 对象没有 '_order_tracker' 属性

Traceback (most recent call last):
  File "hummingbot/core/pubsub.pyx", line 165, in hummingbot.core.pubsub.PubSub.c_trigger_event
    typed_listener.c_call(arg)
  File "hummingbot/core/event/event_listener.pyx", line 25, in hummingbot.core.event.event_listener.EventListener.c_call
    self(arg)
  File "/home/hummingbot/hummingbot/core/event/event_forwarder.py", line 24, in __call__
    self._to_function(self.current_event_tag, self.current_event_caller, arg)
  File "/home/hummingbot/hummingbot/smart_components/executors/position_executor/position_executor.py", line 338, in process_order_created_event
    self.open_order.order = self.get_in_flight_order(self.exchange, event.order_id)
  File "/home/hummingbot/hummingbot/smart_components/smart_component_base.py", line 65, in get_in_flight_order
    order = connector._order_tracker.fetch_order(client_order_id=order_id)
AttributeError: 'hummingbot.connector.exchange.kraken.kraken_exchan' object has no attribute '_order_tracker'
2023-12-02 12:56:07,012 - 15 - hummingbot.core.event.event_reporter - EVENT_LOG - {"timestamp": 1701521767.0, "type": "OrderType.LIMIT", "trading_pair": "ETH-USDT", "amount": "0.01192817", "price": "2095.87", "order_id": "buy-ETH-USDT-1701521766935688", "creation_timestamp": 1701521766.0, "exchange_order_id": null, "leverage": 1, "position": "NIL", "event_name": "BuyOrderCreatedEvent", "event_source": "kraken"}

如果您在 Kraken 上遇到此错误,或者在其他交易所遇到类似错误,这是因为该交易所连接器目前不支持市价订单,而 PositionExecutor 需要市价订单来平仓。

连接器

ValueError: 不存在 'BTC-USD' 的订单簿。

     2024-01-25 21:19:12,916 - 111864 - hummingbot.connector.exchange.kraken.kraken_api_user_stream_data_source - ERROR - Unexpected error with Kraken WebSocket connection. Retrying after 30 seconds...
Traceback (most recent call last):
  File "/home/martin_kou/Development/hummingbot/hummingbot/connector/exchange/kraken/kraken_api_user_stream_data_source.py", line 100, in listen_for_user_stream
    self._current_auth_token = await self.get_auth_token()
  File "/home/martin_kou/Development/hummingbot/hummingbot/connector/exchange/kraken/kraken_api_user_stream_data_source.py", line 89, in get_auth_token
    return response_json["result"]["token"]
KeyError: 'result'

  File "hummingbot/connector/exchange_base.pyx", line 158, in hummingbot.connector.exchange_base.ExchangeBase.c_get_price
    OrderBook order_book = self.c_get_order_book(trading_pair)
  File "hummingbot/connector/exchange/kraken/kraken_exchange.pyx", line 1050, in hummingbot.connector.exchange.kraken.kraken_exchange.KrakenExchange.c_get_order_book
    raise ValueError(f"No order book exists for '{trading_pair}'.")
ValueError: No order book exists for 'BTC-USD'.

如果出现此错误,请确保在创建 API 密钥时也勾选了访问 Websockets API选项。

网关

客户端停留在"script_strategy_base - uniswap_ethereum_mainnet 尚未准备就绪。请稍候..."

您需要批准正在交易的代币。以下是一个在以太坊主网上交易 WETH 的示例

gateway approve-tokens uniswap_ethereum_mainnet WETH

注意

当批准代币时,如果收到“不支持的代币”错误,请确保护存在手动添加代币地址。代币列表可以在./conf/list文件夹中找到

余额命令中不显示代币

Alt text

使用以下命令显示不同网络的代币余额。

>>> gateway connector-tokens uniswap_ethereum_goerli WETH,DAI

其他

无法粘贴,出现错误信息

 Pyperclip could not find a copy/paste mechanism for your system.
    For more information, please visit https://pyperclip.readthedocs.io/en/latest/introduction.html#not-implemented-error

此错误发生是因为CTRL + V在 Hummingbot 中不起作用。请尝试使用以下任何快捷方式进行粘贴。

Shift + Insert 
CTRL + SHIFT + 右键单击  
CTRL + SHIFT + V

如何退出配置

Alt text

CTRL + X 如果您想取消配置

余额显示但未显示($)总额

Alt text

如果一个或多个代币的($)总额显示为 0,请使用以下命令更改您的汇率来源。默认情况下,rate_oracle_source设置为Binance,如果代币在 Binance 上不可用,则($)总额将显示为 0。

config rate_oracle_source