etm.wccoa.exceptions

WinCC OA exception types for structured error handling.

Provides OaError which wraps C++ ErrClass errors with full priority, type, code and text information, and OaErrorCode with the symbolic names of the WinCC OA error codes.

For bulk operations that produce multiple errors, Python’s built-in ExceptionGroup (PEP 654, Python 3.11+) is used:

try:
    values = manager.dp_get(["Missing1.", "Missing2."])
except* OaError as eg:
    for exc in eg.exceptions:
        print(exc.code, exc.text)

Package Contents

API

exception etm.wccoa.exceptions.OaError(*, priority: etm.wccoa.exceptions._error.OaErrorPriority = OaErrorPriority.SEVERE, error_type: etm.wccoa.exceptions._error.OaErrorType = OaErrorType.SYSTEM, code: int = 0, text: str = '', catalog: str = '', time: datetime.datetime | None = None)

Bases: Exception

Exception wrapping a WinCC OA ErrClass error.

Carries the structured error information from the C++ ErrClass: priority, error type, numeric code, message catalogue and text.

  • Variables:
    • priority – Severity level (fatal, severe, warning, info).
    • error_type – Error category (implementation, parametrization, …).
    • code – Numeric error identifier. An OaErrorCode member for the standard catalogue, a plain int otherwise.
    • catalog – Name of the message catalogue the code belongs to. Empty for the errors of WinCC OA itself; set e.g. when a CTRL script raised the error through makeError() with its own catalogue.
    • text – Human-readable error description.
    • time – Moment the error was raised, as local time.

Initialization

Initialize self. See help(type(self)) for accurate signature.

add_note()

class args

with_traceback()

class etm.wccoa.exceptions.OaErrorCode

Bases: enum.IntEnum

Error codes reported by WinCC OA.

Mirrors the C++ enumerator ErrClass::ErrCode; the message texts are those of _errors.cat. Use these names instead of magic numbers when inspecting the code of an OaError:

except OaError as err:
    if err.code == OaErrorCode.DP_NOT_EXISTENT:
        ...

Defects detected by the Python binding itself are not reported through this enumeration; they raise the matching built-in exception instead (ValueError, TypeError, OverflowError, RuntimeError).

Initialization

Initialize self. See help(type(self)) for accurate signature.

NOERR

0

MANAGER_START

1

MANAGER_STOP

2

TRYING_CONNECT

3

CONNECTED

4

CANT_CONNECT

5

MANAGER_INITIALIZED

6

DPNOTEXISTENT

7

ELNOTEXISTENT

8

CONFIGNOTEXISTENT

9

WRONGATTRIBADRESS

10

ILLEGALCONVERSION

11

SMOOTHINGERR

12

CONVERSION2ING

13

CONVERSION2RAW

14

MISSINGCONFIG

15

MISSINGMODULE

16

MISSINGPANEL

17

OUTOFALERTRANGES

18

ATTRIBUTENOTEXISTENT

19

ORIGINTIMEINCORRECT

20

CONFIGTYPEINCORRECT

21

NOCONSISTENCE

22

CHANGEATTRIBUTEFAILED

23

CONFIGLOCKED

24

CONFIGISNOTLOCKED

25

OTHERUSERLOCKED

26

INCORRECTLOCKVARIABLE

27

CREATECONFIGFAILED

28

OUTOFPVSSRANGE

29

OUTOFUSERRANGE

30

TYPECHANGEFAILED

31

CONNECTIONNOTEXISTENT

32

DM

33

DPEXISTS

34

TYPEEXISTS

35

SYNTAX

36

CONCURRENT

37

MSGSENDERROR

38

BROKENCONNECTION

39

MISSINGPARENTPANEL

40

DPVARIABLEINACTIVE

41

NODEFAULTVALUE

42

ORIGINTIMEOLDER

43

ALERTPRIORITY

44

CTRL

45

NOTARCHIVED

46

DUPLICATEOUTPUTPA

47

NOTCORRECTED

48

NOTEXISTINGADDRESS

49

DEFAULTBRANCH

50

PARAMETERERROR

51

WRONGMSGTYPE

52

ILLEGALFUNCALL

53

UNEXPECTEDSTATE

54

WRONGERRDESCR

55

INVALIDSYSNUM

56

TYPENOTEXISTENT

57

DPALLOCFAIL

58

ELEMENTNOTEXISTENT

59

CONFIGALLOCFAIL

60

FILEOPEN

61

USEDALERTCLASSFREED

62

CONNECTIONFAILURE

63

WRONGIPCTYPE

64

WRONGDESTINATION

65

STARTCONNECT

66

SENDFAILURE

67

PROCESSDIED

68

DBERROR

69

X11

70

DP_NOT_EXISTENT

71

UNDEFD_FUNC

72

UNDEFD_VAR

73

NOT_A_VARIABLE

74

ARG_MISSING

75

ILLEGAL_ARG

76

NO_ARRAY

77

NO_LVALUE

78

INDEX_OUT_OF_RANGE

79

DIVISION_BY_ZERO

80

SYNTAX_ERROR

81

FILE_NOT_OPEN

82

DM_NOBG

83

LIB_IN_USE

84

REREADING_LIB

85

ILLEGAL_VALUE

86

DM_INVALID_STAMP

87

ILLEGAL_OP

88

DP_INSERT_OR_DELETE

89

DP_ATTR_TWICE

90

CONNECT_ALL_DPS

91

ENDLESS_LOOP

92

CONFIG_NOT_CHANGED

93

COMMUNICATION_FAILURE

94

ILLEGAL_KEYWORD

95

PERMISSION_MISSING

96

ALERT_NOT_EXISTENT

97

NOTHING_TO_ACK

98

TRANSFORM_ERROR

99

UNKNOWN_PERIPHADDR

100

CONNECT_AGAIN

101

WAIT_FOR_USER

102

USER_PASS_INITIALIZED

103

ILLEGAL_USER_PASSWORD

104

LICENSE_INVALID

105

DM_REPAIR

106

AUTOMATIC_DISCONNECT

107

LICENSE_INFO

108

CONNECT_ABORTED

109

QUERY_CONNECT_ABORTED_BY_EVENT

110

QUERY_CONNECT_ABORTED_BY_DIST

111

DM_EMERGENCY_MODE

112

DM_BACKUP_MODE

113

VALUES_DISCARDED

114

REDU_CHANGES_ABORTED

115

LIB_VAR_ALREADY_DEFINED

116

LIB_NOTEXIST_USES

117

SUPPRESS_ERROR_START

118

SUPPRESS_ERROR_END

119

PMON_NO_GET_SEM

120

PMON_NO_GET_SHM

121

PMON_NO_ATT_SHM

122

PMON_NO_GET_SHM_FILEMAPPING

123

PMON_NO_MAP_SHM

124

PMON_PROGS_TOO_MANY_LINES

125

PMON_PROGS_NO_WRITE

126

PMON_PROGS_NOT_FOUND

127

PMON_PROGS_NO_READ

128

PMON_PROGS_WRONG_VERSION

130

PMON_PROGS_ILLEGALENTRY

131

PMON_PROGS_ILLEGALSTARTMODE

132

SHAREDLIB_NOTFOUND

133

SHAREDLIB_NOFUNCTION

134

ASCII_NOSTART

135

SSL_FUNC_ERROR

136

SSL_SERVERCERT_NOTFOUND

137

SSL_SERVERCERT_UNKNOWNERROR

138

SSL_PRIVKEY_NOTFOUND

139

SSL_PRIVKEY_UNKNOWNERROR

140

SSL_CLIENTCONNECTION_NOENCRYPT

141

PMON_PROJ_CUR_NOT_STARTED

142

QUERY_ABORTED_WITH_ERROR

143

DIST_SYSTEM_DISCONNECTED

144

DRV_QUEUE_FULL

145

DRV_TOO_MANY_VC

146

DRV_QUEUE_EMPTY

147

FUNCTION_DEPRECATED

148

LICENSE_FIXED_UI_INVALID

149

LICENSE_CODE_IN_USE

150

DP_ERROR_DPT_EVENT

151

LICENSE_FIXED_UI_EXCEEDED

152

LICENSE_HWCODE_USAGE

153

LICENSE_SHIELD_NOTFOUND

154

LICENSE_SHIELD_INVALID

155

DRIVER_INIT_FINISHED

156

DPQUERYCONNECT_REFRESHED

157

SERVERSOCKET_OPEN_ERROR

158

ALIVESOCKET_OPEN_ERROR

159

CON_DISC_SYSTEM

160

CON_DISC_ALL

161

CON_SYSTEM_OK

162

LOGMSG_LOST

163

LOGLIMIT_REACHED_NORENAME

164

LOGLIMIT_REACHED_RENAME

165

ERR_OPEN_ALIVE_CONNECTION

166

INVALID_LANG_COUNT

167

INIT_ALERTS

168

INIT_DPFUNCS

169

SIG_RECEIVED

170

EXIT_DELAYED

171

REQUEST_CANCELED

172

SET_MSG_VERSION

173

AUTH_ERROR

174

INVALID_DIST_REQUEST

175

UNCAUGHT_EXCEPTION

176

CANNOT_START

177

EXECUTED

178

MULTI_REFERRED_ALERT

179

SPECIFY_ALERT_CLASS

180

CLOSINGCONNECTION

181

NO_ALERTCLASS_DP

182

DP_SET_ABORTED

183

CORRECT_TIME_DIFFERENCES

184

MOVE_CONFIG_ENTRY

185

ALERT_PAIR_NOT_FOUND

186

NO_GONE_BETWEEN_TWO_CAME

187

ALERT_NOT_VISIBLE_AND_NOT_GONE

188

OBSOLETE_BIT_NOT_SET

189

ELDEST_ACK_BIT_NOT_SET

190

ESCALATION_ALERTCLASS_DIFFERENCE

191

SUMALERT_RECURSION

192

NO_ALERT_CLASS

193

USED_ALERT_CLASS_DELETED

194

SHUTDOWN_MSG_RECEIVED

195

ILLEGAL_UTF8_BYTE

196

CREATING_END_POINT

197

CERT_FILE_ERROR

198

INIT_SSL_WRAPPER_ERROR

199

INIT_CERT_FILES_ERROR

200

SSL_LIBRARY_ERROR

201

SSL_UNKNOWN_ERROR

202

CONNECT_TO_WRONG_HOST

203

NOT_REDUNDANT_SYSTEM

204

NOT_DISTRIBUTED_SYSTEM

205

CANNOT_FIND_HOST_IN_HOSTLIST

209

CONNECTION_ESTABLISHED

210

BCM_ERR_WINCERT_NOMATCHING

211

BCM_ERR_WINCERT_NOVALIDBYSUBJECT

212

BCM_ERR_OPENSTORE

213

BCM_ERR_REQ_X509

214

BCM_ERR_CRYPT_ACQ

215

BCM_ERR_CRYPT_EXPKEY

216

BCM_ERR_WRAP_CIPHER

217

BCM_ERR_CERT_EXPIRED

218

BCM_ERR_CERT_VERIFICATION_FAILED

219

MXPROXY_START

220

MXPROXY_STOP

221

ACCEPT_CONNECTION

222

LOCALHOST_MISSING

223

CONFIG_SEC_ISSUE

224

LANG_CONFIG_MISMATCH

225

DPRENAME_UNPATCHED

226

FILE_CACHE_NOT_FOUND

227

NO_MAN_NUM_FREE

228

MAN_ALREADY_CONNECTED

229

LICENSE_INVALID_MAX_MAN

230

NO_COMMON_MSG_COMPRESSION

231

CR_HANDSHAKE_IN_PROGRESS

237

ALERT_PAIR_EXISTS

238

RE_ALERT_CAME_TIME_MISSING

239

RE_ALERT_GONE_TIME_MISSING

240

RE_ALERT_NOT_ALLOWED

241

BCM_ERR_SET_PROTO_VER

242

CONNECT_TO_WRONG_SERVER

243

CONNECT_TO_WRONG_ALIVE_SERVER

244

DPTYPE_IS_INCONSISTENT

246

DPTYPE_ID_ALLOCATION_FAILED

247

DPTYPE_INVALID_REFERENCES

248

DPTYPE_NAME_SET_FAILED

249

DPTYPE_ELEMENTNAME_SET_FAILED

250

DPTYPE_STILL_REFERENCED

251

DELAYED_REFRESH_CONNECTIONS

252

DEPRECATED_LIBRARY

253

BCM_ERR_CERT_CHAIN_PREFIX

254

AUTH_CONFIG_CHANGED

255

DNS_REVERSE_LOOKUP_WARNING

256

DNS_REVERSE_LOOKUP_ERROR

257

DNS_LOOKUP_WARNING

258

DNS_LOOKUP_ERROR

259

VALUE_CHANGE_NOT_REDIRECTABLE

260

ARRAY_LENGTHS_DIFFER

261

as_integer_ratio()

bit_count()

bit_length()

conjugate()

class denominator

class imag

class numerator

class real

to_bytes()

name()

value()

class etm.wccoa.exceptions.OaErrorPriority

Bases: enum.IntEnum

Severity level of a WinCC OA error.

Values match ErrClass::ErrPrio (C++) and ccm::ErrorPriority.

Initialization

Initialize self. See help(type(self)) for accurate signature.

FATAL

0

SEVERE

1

WARNING

2

INFO

3

as_integer_ratio()

bit_count()

bit_length()

conjugate()

class denominator

class imag

class numerator

class real

to_bytes()

name()

value()

class etm.wccoa.exceptions.OaErrorType

Bases: enum.IntEnum

Category of a WinCC OA error.

Values match ErrClass::ErrType (C++) and ccm::ErrorType.

Initialization

Initialize self. See help(type(self)) for accurate signature.

IMPLEMENTATION

0

PARAMETRIZATION

1

SYSTEM

2

CONTROL

3

REDUNDANCY

4

as_integer_ratio()

bit_count()

bit_length()

conjugate()

class denominator

class imag

class numerator

class real

to_bytes()

name()

value()