Error list and utilities for handling errors in DIRAC

This module contains list of errors that can be encountered in DIRAC. It complements the errno module of python.

It also contains utilities to manipulate these errors.

Finally, it contains a DErrno class that contains an error number as well as a low level error message. It behaves like a string for compatibility reasons

In order to add extension specific error, you need to create in your extension the file Core/Utilities/, which will contain the following dictionary:

  • extra_dErrName: keys are the error name, values the number of it

  • extra_dErrorCode: same as dErrorCode. keys are the error code, values the name

    (we don’t simply revert the previous dict in case we do not have a one to one mapping)

  • extra_dStrError: same as dStrError, Keys are the error code, values the error description

  • extra_compatErrorString: same as compatErrorString. The compatible error strings are

    added to the existing one, and not replacing them.

Example of extension file :

  • extra_dErrName = { ‘ELHCBSPE’ : 3001 }

  • extra_dErrorCode = { 3001 : ‘ELHCBSPE’}

  • extra_dStrError = { 3001 : “This is a description text of the specific LHCb error” }

  • extra_compatErrorString = { 3001[“living easy, living free”],

    DErrno.ERRX : [‘An error message for ERRX that is specific to LHCb’]}

DIRAC.Core.Utilities.DErrno.cmpError(inErr, candidate)

This function compares an error (in its old form (a string or dictionary) or in its int form with a candidate error code.

  • inErr (str or int or S_ERROR) – a string, an integer, a S_ERROR dictionary

  • candidate (int) – error code to compare with


True or False

If an S_ERROR instance is passed, we compare the code with S_ERROR[‘Errno’] If it is a Integer, we do a direct comparison If it is a String, we use strerror to check the error string


Merge all the errors of all the extensions into the errors of these modules Should be called only at the initialization of DIRAC, so by the parseCommandLine,,,


This method wraps up os.strerror, and behave the same way. It completes it with the DIRAC specific errors.


DIRAC.Core.Utilities.DErrno.ETYPE = 1000

Object Type Error

DIRAC.Core.Utilities.DErrno.EIMPERR = 1001

Failed to import library

DIRAC.Core.Utilities.DErrno.ENOMETH = 1002

No such method or function

DIRAC.Core.Utilities.DErrno.ECONF = 1003

Configuration error

DIRAC.Core.Utilities.DErrno.EVALUE = 1004

Wrong value passed

DIRAC.Core.Utilities.DErrno.EEEXCEPTION = 1005

runtime general exception

DIRAC.Core.Utilities.DErrno.ECTMPF = 1010

Failed to create temporary file

DIRAC.Core.Utilities.DErrno.EOF = 1011

Cannot open file

DIRAC.Core.Utilities.DErrno.ERF = 1012

Cannot read from file

DIRAC.Core.Utilities.DErrno.EWF = 1013

Cannot write to file

DIRAC.Core.Utilities.DErrno.ESPF = 1014

Cannot set permissions to file

DIRAC.Core.Utilities.DErrno.EX509 = 1100

Generic Error with X509

DIRAC.Core.Utilities.DErrno.EPROXYFIND = 1101

Can’t find proxy

DIRAC.Core.Utilities.DErrno.EPROXYREAD = 1102

Can’t read proxy

DIRAC.Core.Utilities.DErrno.ECERTFIND = 1103

Can’t find certificate

DIRAC.Core.Utilities.DErrno.ECERTREAD = 1104

Can’t read certificate

DIRAC.Core.Utilities.DErrno.ENOCERT = 1105

No certificate loaded

DIRAC.Core.Utilities.DErrno.ENOCHAIN = 1106

No chain loaded

DIRAC.Core.Utilities.DErrno.ENOPKEY = 1107

No private key loaded

DIRAC.Core.Utilities.DErrno.ENOGROUP = 1108

No DIRAC group

DIRAC.Core.Utilities.DErrno.EDISET = 1110


DIRAC.Core.Utilities.DErrno.ENOAUTH = 1111

Unauthorized query

DIRAC.Core.Utilities.DErrno.E3RDPARTY = 1120

3rd party security service error

DIRAC.Core.Utilities.DErrno.EVOMS = 1121

VOMS Error

DIRAC.Core.Utilities.DErrno.EDB = 1130

Database Error

DIRAC.Core.Utilities.DErrno.EMYSQL = 1131

MySQL Error

DIRAC.Core.Utilities.DErrno.ESQLA = 1132

SQLAlchemy Error

DIRAC.Core.Utilities.DErrno.EMQUKN = 1140

Unknown MQ Error

DIRAC.Core.Utilities.DErrno.EMQNOM = 1141

No messages

DIRAC.Core.Utilities.DErrno.EMQCONN = 1142

MQ connection failure

DIRAC.Core.Utilities.DErrno.EELNOFOUND = 1146

Index not found

DIRAC.Core.Utilities.DErrno.EEZOMBIE = 1147

Zombie process

DIRAC.Core.Utilities.DErrno.EENOPID = 1148

No PID of process

DIRAC.Core.Utilities.DErrno.ESECTION = 1400

Section is not found

DIRAC.Core.Utilities.DErrno.EWMSUKN = 1500

Unknown WMS error

DIRAC.Core.Utilities.DErrno.EWMSJDL = 1501

Invalid job description

DIRAC.Core.Utilities.DErrno.EWMSRESC = 1502

Job to reschedule

DIRAC.Core.Utilities.DErrno.EWMSSUBM = 1503

Job submission error

DIRAC.Core.Utilities.DErrno.EWMSJMAN = 1504

Job management error

DIRAC.Core.Utilities.DErrno.EWMSSTATUS = 1505

Job status error

DIRAC.Core.Utilities.DErrno.EWMSNOMATCH = 1510

No match found

DIRAC.Core.Utilities.DErrno.EWMSPLTVER = 1511

Pilot version does not match

DIRAC.Core.Utilities.DErrno.EWMSNOPILOT = 1550

No pilots found

DIRAC.Core.Utilities.DErrno.EFILESIZE = 1601

Bad file size

DIRAC.Core.Utilities.DErrno.EGFAL = 1602

Error with the gfal call

DIRAC.Core.Utilities.DErrno.EBADCKS = 1603

Bad checksum

DIRAC.Core.Utilities.DErrno.EFCERR = 1604

FileCatalog error

DIRAC.Core.Utilities.DErrno.ERMSUKN = 1700

Unknown RMS error

DIRAC.Core.Utilities.DErrno.ETSUKN = 1900

Unknown Transformation System Error

DIRAC.Core.Utilities.DErrno.ETSDATA = 1901

Invalid Input Data definition

DIRAC.Core.Utilities.DErrno.ERESGEN = 2000

Unknown Resource Failure

DIRAC.Core.Utilities.DErrno.ERESUNA = 2001

Resource not available

DIRAC.Core.Utilities.DErrno.ERESUNK = 2002

Unknown Resource