Skip to content

Troubleshoot common issues

Resolve the most common local startup, adapter, and group-management issues. Each entry describes the symptom, the cause, and the fix.

Confirm Python and uv are available and meet the version requirements:

Terminal window
python --version # must be 3.13
uv --version

Install dependencies with:

Terminal window
uv sync --frozen

An in_containers 配置错误 error means a Boolean was written in a non-JSON form. NoneBot configuration files only accept standard JSON lowercase true / false.

Correct:

LINGCHU_IN_CONTAINERS=true

Incorrect:

LINGCHU_IN_CONTAINERS=True

Check, in order:

  1. Whether the service for the enabled adapter has started (default is OneBot V11).
  2. Whether NoneBot and the enabled adapter connection settings match.
  3. Whether the account, network, firewall, and platform permissions are usable.

When LINGCHUAdapter is unset, Lingchu Bot enables ~onebot.v11 by default. Ensure NoneBot has loaded the OneBot V11 adapter.

The selected adapter was not loaded or registered by NoneBot. Either load the matching adapter or change LINGCHUAdapter to one that is already loaded.

Do not explicitly configure multiple adapters for the same platform. For example, LINGCHUAdapter = "~onebot.v11+~another_adapter" fails immediately.

Extra registered same-platform adapters do not create a conflict. Lingchu Bot treats unselected adapters as disabled. Unknown adapters that do not belong to any platform profile are not considered enabled; message storage writes their platform field as unknown.

Mute, unmute, and whole-group mute depend on platform permissions. When they fail, check:

  1. Whether the bot is in the target group.
  2. Whether the bot has the required management permission (admin or owner).
  3. Whether the target user can be operated on by the bot (e.g. not a higher-ranked admin).
  4. Whether the enabled adapter API reports a network error or rejected operation.

Check whether LINGCHU_LOCALE is set to a supported catalog such as zh_CN or en_US. Unknown text falls back to the original message.

Read the failing command and line number, then fix only the related scope. Common checks:

Terminal window
uv run -m ruff check . --output-format=github
uv run -m ruff format --check .
uv run -m pyright
uv run -m ty check --output-format github
uv run -m pytest