Skip to content

StatusCodeError

Canonical path: o6.StatusCodeError

StatusCodeError

Bases: Exception

Raised when an OPC UA operation returns a bad StatusCode.

Every failing service call, encode, decode, or attribute access raises this instead of returning a status, so ordinary Python error handling applies.

See Errors and status codes.

Attributes

code instance-attribute

code

The raw 32-bit status value.

symbol instance-attribute

symbol

The OPC UA spelling of the status, e.g. "BadNodeIdUnknown".

This is the spec's name. The matching StatusCode member uses upper-snake case, so a BAD_NODE_ID_UNKNOWN error reports "BadNodeIdUnknown" here.

Functions

__init__

__init__(status_code)