HKUDS/nanobot · error · ImportError

Matrix dependencies not installed. Run: nanobot plugins…

Error message

Matrix dependencies not installed. Run: nanobot plugins enable matrix

What it means

Module-level ImportError raised while importing matrix/nio dependencies: the optional matrixsdk (nio) package family is absent, so the Matrix channel runtime cannot be imported at all. The chained import error identifies the missing package.

Solutions

  1. Run 'nanobot plugins enable matrix' to install the optional dependencies
  2. pip install the nio matrix SDK into the environment
  3. Disable the Matrix channel if it is not needed
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at nanobot/channels/matrix/runtime.py:55 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of HKUDS/nanobot@42f37dc4c0 (2026-08-26). Data as JSON: /api/errors/8779844124add7e7. Report an issue: GitHub.

Appendix: source

Thrown at nanobot/channels/matrix/runtime.py:55

        KeyVerificationStart,
        LoginResponse,
        MatrixRoom,
        RoomEncryptedMedia,
        RoomMessage,
        RoomMessageMedia,
        RoomMessageText,
        RoomSendError,
        RoomSendResponse,
        RoomTypingError,
        SyncError,
        SyncResponse,
        ToDeviceError,
        UploadError,
    )
    from nio.crypto.attachments import decrypt_attachment
    from nio.exceptions import EncryptionError
except ImportError as e:
    raise ImportError(
        "Matrix dependencies not installed. Run: nanobot plugins enable matrix"
    ) from e

from nanobot.bus.events import OutboundMessage
from nanobot.bus.outbound_events import ProgressEvent
from nanobot.bus.queue import MessageBus
from nanobot.channels.base import BaseChannel
from nanobot.config.paths import get_data_dir, get_media_dir
from nanobot.config.schema import Base
from nanobot.utils.helpers import safe_filename
from nanobot.utils.logging_bridge import redirect_lib_logging

TYPING_NOTICE_TIMEOUT_MS = 30_000
# Must stay below TYPING_NOTICE_TIMEOUT_MS so the indicator doesn't expire mid-processing.
TYPING_KEEPALIVE_INTERVAL_MS = 20_000
MATRIX_HTML_FORMAT = "org.matrix.custom.html"
_ATTACH_MARKER = "[attachment: {}]"
_ATTACH_TOO_LARGE = "[attachment: {} - too large]"

View on GitHub (pinned to 42f37dc4c0)