Skip to content

Exceptions

pycomap.ComApError

Bases: Exception

Base class for all pycomap errors.

pycomap.ComApProtocolError

Bases: ComApError

Raised when the wire protocol itself misbehaves (bad CRC, unexpected framing, unsupported cipher, unexpected message type, etc.) — never on a clean controller-side error response, see ComApControllerError for that.

pycomap.ComApAuthError

Bases: ComApError

Raised when access-code verification fails or is rejected by the controller.

pycomap.ComApConnectionError

Bases: ComApError

Raised on TCP-level connection problems (refused, closed, timed out).

pycomap.ComApControllerError

ComApControllerError(code: int, message: str | None = None)

Bases: ComApError

Raised when the controller answers with an explicit Error operation.

Attributes:

Name Type Description
code

the raw uint32 error code reported by the controller. See docs/protocol.md section 2.6 for known values.