How to use _message method in pandera

Best Python code snippet using pandera_python

Message.py

Source:Message.py Github

copy

Full Screen

1# This file was automatically generated by SWIG (http://www.swig.org).2# Version 4.0.13#4# Do not make changes to this file unless you know what you are doing--modify5# the SWIG interface file instead.6"""7Message module, see official documentation at8https://www.opencascade.com/doc/occt-7.4.0/refman/html/package_message.html9"""10from sys import version_info as _swig_python_version_info11if _swig_python_version_info < (2, 7, 0):12 raise RuntimeError("Python 2.7 or later required")13# Import the low-level C/C++ module14if __package__ or "." in __name__:15 from . import _Message16else:17 import _Message18try:19 import builtins as __builtin__20except ImportError:21 import __builtin__22_swig_new_instance_method = _Message.SWIG_PyInstanceMethod_New23_swig_new_static_method = _Message.SWIG_PyStaticMethod_New24def _swig_repr(self):25 try:26 strthis = "proxy of " + self.this.__repr__()27 except __builtin__.Exception:28 strthis = ""29 return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)30def _swig_setattr_nondynamic_instance_variable(set):31 def set_instance_attr(self, name, value):32 if name == "thisown":33 self.this.own(value)34 elif name == "this":35 set(self, name, value)36 elif hasattr(self, name) and isinstance(getattr(type(self), name), property):37 set(self, name, value)38 else:39 raise AttributeError("You cannot add instance attributes to %s" % self)40 return set_instance_attr41def _swig_setattr_nondynamic_class_variable(set):42 def set_class_attr(cls, name, value):43 if hasattr(cls, name) and not isinstance(getattr(cls, name), property):44 set(cls, name, value)45 else:46 raise AttributeError("You cannot add class attributes to %s" % cls)47 return set_class_attr48def _swig_add_metaclass(metaclass):49 """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""50 def wrapper(cls):51 return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())52 return wrapper53class _SwigNonDynamicMeta(type):54 """Meta class to enforce nondynamic attributes (no new attributes) for a class"""55 __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)56class SwigPyIterator(object):57 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")58 def __init__(self, *args, **kwargs):59 raise AttributeError("No constructor defined - class is abstract")60 __repr__ = _swig_repr61 __swig_destroy__ = _Message.delete_SwigPyIterator62 value = _swig_new_instance_method(_Message.SwigPyIterator_value)63 incr = _swig_new_instance_method(_Message.SwigPyIterator_incr)64 decr = _swig_new_instance_method(_Message.SwigPyIterator_decr)65 distance = _swig_new_instance_method(_Message.SwigPyIterator_distance)66 equal = _swig_new_instance_method(_Message.SwigPyIterator_equal)67 copy = _swig_new_instance_method(_Message.SwigPyIterator_copy)68 next = _swig_new_instance_method(_Message.SwigPyIterator_next)69 __next__ = _swig_new_instance_method(_Message.SwigPyIterator___next__)70 previous = _swig_new_instance_method(_Message.SwigPyIterator_previous)71 advance = _swig_new_instance_method(_Message.SwigPyIterator_advance)72 __eq__ = _swig_new_instance_method(_Message.SwigPyIterator___eq__)73 __ne__ = _swig_new_instance_method(_Message.SwigPyIterator___ne__)74 __iadd__ = _swig_new_instance_method(_Message.SwigPyIterator___iadd__)75 __isub__ = _swig_new_instance_method(_Message.SwigPyIterator___isub__)76 __add__ = _swig_new_instance_method(_Message.SwigPyIterator___add__)77 __sub__ = _swig_new_instance_method(_Message.SwigPyIterator___sub__)78 def __iter__(self):79 return self80# Register SwigPyIterator in _Message:81_Message.SwigPyIterator_swigregister(SwigPyIterator)82def _dumps_object(klass):83 """ Overwrite default string output for any wrapped object.84 By default, __repr__ method returns something like:85 <OCC.Core.TopoDS.TopoDS_Shape; proxy of <Swig Object of type 'TopoDS_Shape *' at 0x02BB0758> >86 This is too much verbose.87 We prefer :88 <class 'gp_Pnt'>89 or90 <class 'TopoDS_Shape'>91 """92 klass_name = str(klass.__class__).split(".")[3].split("'")[0]93 repr_string = "<class '" + klass_name + "'"94# for TopoDS_Shape, we also look for the base type95 if klass_name == "TopoDS_Shape":96 if klass.IsNull():97 repr_string += ": Null>"98 return repr_string99 st = klass.ShapeType()100 types = {OCC.Core.TopAbs.TopAbs_VERTEX: "Vertex",101 OCC.Core.TopAbs.TopAbs_SOLID: "Solid",102 OCC.Core.TopAbs.TopAbs_EDGE: "Edge",103 OCC.Core.TopAbs.TopAbs_FACE: "Face",104 OCC.Core.TopAbs.TopAbs_SHELL: "Shell",105 OCC.Core.TopAbs.TopAbs_WIRE: "Wire",106 OCC.Core.TopAbs.TopAbs_COMPOUND: "Compound",107 OCC.Core.TopAbs.TopAbs_COMPSOLID: "Compsolid"}108 repr_string += "; Type:%s" % types[st] 109 elif hasattr(klass, "IsNull"):110 if klass.IsNull():111 repr_string += "; Null"112 repr_string += ">"113 return repr_string114from six import with_metaclass115import warnings116from OCC.Wrapper.wrapper_utils import Proxy, deprecated117import OCC.Core.Standard118import OCC.Core.NCollection119Message_None = _Message.Message_None120Message_Done1 = _Message.Message_Done1121Message_Done2 = _Message.Message_Done2122Message_Done3 = _Message.Message_Done3123Message_Done4 = _Message.Message_Done4124Message_Done5 = _Message.Message_Done5125Message_Done6 = _Message.Message_Done6126Message_Done7 = _Message.Message_Done7127Message_Done8 = _Message.Message_Done8128Message_Done9 = _Message.Message_Done9129Message_Done10 = _Message.Message_Done10130Message_Done11 = _Message.Message_Done11131Message_Done12 = _Message.Message_Done12132Message_Done13 = _Message.Message_Done13133Message_Done14 = _Message.Message_Done14134Message_Done15 = _Message.Message_Done15135Message_Done16 = _Message.Message_Done16136Message_Done17 = _Message.Message_Done17137Message_Done18 = _Message.Message_Done18138Message_Done19 = _Message.Message_Done19139Message_Done20 = _Message.Message_Done20140Message_Done21 = _Message.Message_Done21141Message_Done22 = _Message.Message_Done22142Message_Done23 = _Message.Message_Done23143Message_Done24 = _Message.Message_Done24144Message_Done25 = _Message.Message_Done25145Message_Done26 = _Message.Message_Done26146Message_Done27 = _Message.Message_Done27147Message_Done28 = _Message.Message_Done28148Message_Done29 = _Message.Message_Done29149Message_Done30 = _Message.Message_Done30150Message_Done31 = _Message.Message_Done31151Message_Done32 = _Message.Message_Done32152Message_Warn1 = _Message.Message_Warn1153Message_Warn2 = _Message.Message_Warn2154Message_Warn3 = _Message.Message_Warn3155Message_Warn4 = _Message.Message_Warn4156Message_Warn5 = _Message.Message_Warn5157Message_Warn6 = _Message.Message_Warn6158Message_Warn7 = _Message.Message_Warn7159Message_Warn8 = _Message.Message_Warn8160Message_Warn9 = _Message.Message_Warn9161Message_Warn10 = _Message.Message_Warn10162Message_Warn11 = _Message.Message_Warn11163Message_Warn12 = _Message.Message_Warn12164Message_Warn13 = _Message.Message_Warn13165Message_Warn14 = _Message.Message_Warn14166Message_Warn15 = _Message.Message_Warn15167Message_Warn16 = _Message.Message_Warn16168Message_Warn17 = _Message.Message_Warn17169Message_Warn18 = _Message.Message_Warn18170Message_Warn19 = _Message.Message_Warn19171Message_Warn20 = _Message.Message_Warn20172Message_Warn21 = _Message.Message_Warn21173Message_Warn22 = _Message.Message_Warn22174Message_Warn23 = _Message.Message_Warn23175Message_Warn24 = _Message.Message_Warn24176Message_Warn25 = _Message.Message_Warn25177Message_Warn26 = _Message.Message_Warn26178Message_Warn27 = _Message.Message_Warn27179Message_Warn28 = _Message.Message_Warn28180Message_Warn29 = _Message.Message_Warn29181Message_Warn30 = _Message.Message_Warn30182Message_Warn31 = _Message.Message_Warn31183Message_Warn32 = _Message.Message_Warn32184Message_Alarm1 = _Message.Message_Alarm1185Message_Alarm2 = _Message.Message_Alarm2186Message_Alarm3 = _Message.Message_Alarm3187Message_Alarm4 = _Message.Message_Alarm4188Message_Alarm5 = _Message.Message_Alarm5189Message_Alarm6 = _Message.Message_Alarm6190Message_Alarm7 = _Message.Message_Alarm7191Message_Alarm8 = _Message.Message_Alarm8192Message_Alarm9 = _Message.Message_Alarm9193Message_Alarm10 = _Message.Message_Alarm10194Message_Alarm11 = _Message.Message_Alarm11195Message_Alarm12 = _Message.Message_Alarm12196Message_Alarm13 = _Message.Message_Alarm13197Message_Alarm14 = _Message.Message_Alarm14198Message_Alarm15 = _Message.Message_Alarm15199Message_Alarm16 = _Message.Message_Alarm16200Message_Alarm17 = _Message.Message_Alarm17201Message_Alarm18 = _Message.Message_Alarm18202Message_Alarm19 = _Message.Message_Alarm19203Message_Alarm20 = _Message.Message_Alarm20204Message_Alarm21 = _Message.Message_Alarm21205Message_Alarm22 = _Message.Message_Alarm22206Message_Alarm23 = _Message.Message_Alarm23207Message_Alarm24 = _Message.Message_Alarm24208Message_Alarm25 = _Message.Message_Alarm25209Message_Alarm26 = _Message.Message_Alarm26210Message_Alarm27 = _Message.Message_Alarm27211Message_Alarm28 = _Message.Message_Alarm28212Message_Alarm29 = _Message.Message_Alarm29213Message_Alarm30 = _Message.Message_Alarm30214Message_Alarm31 = _Message.Message_Alarm31215Message_Alarm32 = _Message.Message_Alarm32216Message_Fail1 = _Message.Message_Fail1217Message_Fail2 = _Message.Message_Fail2218Message_Fail3 = _Message.Message_Fail3219Message_Fail4 = _Message.Message_Fail4220Message_Fail5 = _Message.Message_Fail5221Message_Fail6 = _Message.Message_Fail6222Message_Fail7 = _Message.Message_Fail7223Message_Fail8 = _Message.Message_Fail8224Message_Fail9 = _Message.Message_Fail9225Message_Fail10 = _Message.Message_Fail10226Message_Fail11 = _Message.Message_Fail11227Message_Fail12 = _Message.Message_Fail12228Message_Fail13 = _Message.Message_Fail13229Message_Fail14 = _Message.Message_Fail14230Message_Fail15 = _Message.Message_Fail15231Message_Fail16 = _Message.Message_Fail16232Message_Fail17 = _Message.Message_Fail17233Message_Fail18 = _Message.Message_Fail18234Message_Fail19 = _Message.Message_Fail19235Message_Fail20 = _Message.Message_Fail20236Message_Fail21 = _Message.Message_Fail21237Message_Fail22 = _Message.Message_Fail22238Message_Fail23 = _Message.Message_Fail23239Message_Fail24 = _Message.Message_Fail24240Message_Fail25 = _Message.Message_Fail25241Message_Fail26 = _Message.Message_Fail26242Message_Fail27 = _Message.Message_Fail27243Message_Fail28 = _Message.Message_Fail28244Message_Fail29 = _Message.Message_Fail29245Message_Fail30 = _Message.Message_Fail30246Message_Fail31 = _Message.Message_Fail31247Message_Fail32 = _Message.Message_Fail32248Message_Trace = _Message.Message_Trace249Message_Info = _Message.Message_Info250Message_Warning = _Message.Message_Warning251Message_Alarm = _Message.Message_Alarm252Message_Fail = _Message.Message_Fail253Message_DONE = _Message.Message_DONE254Message_WARN = _Message.Message_WARN255Message_ALARM = _Message.Message_ALARM256Message_FAIL = _Message.Message_FAIL257class Message_ListOfMsg(object):258 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")259 __repr__ = _swig_repr260 begin = _swig_new_instance_method(_Message.Message_ListOfMsg_begin)261 end = _swig_new_instance_method(_Message.Message_ListOfMsg_end)262 cbegin = _swig_new_instance_method(_Message.Message_ListOfMsg_cbegin)263 cend = _swig_new_instance_method(_Message.Message_ListOfMsg_cend)264 def __init__(self, *args):265 _Message.Message_ListOfMsg_swiginit(self, _Message.new_Message_ListOfMsg(*args))266 Size = _swig_new_instance_method(_Message.Message_ListOfMsg_Size)267 Assign = _swig_new_instance_method(_Message.Message_ListOfMsg_Assign)268 Set = _swig_new_instance_method(_Message.Message_ListOfMsg_Set)269 Clear = _swig_new_instance_method(_Message.Message_ListOfMsg_Clear)270 First = _swig_new_instance_method(_Message.Message_ListOfMsg_First)271 Last = _swig_new_instance_method(_Message.Message_ListOfMsg_Last)272 Append = _swig_new_instance_method(_Message.Message_ListOfMsg_Append)273 Prepend = _swig_new_instance_method(_Message.Message_ListOfMsg_Prepend)274 RemoveFirst = _swig_new_instance_method(_Message.Message_ListOfMsg_RemoveFirst)275 Remove = _swig_new_instance_method(_Message.Message_ListOfMsg_Remove)276 InsertBefore = _swig_new_instance_method(_Message.Message_ListOfMsg_InsertBefore)277 InsertAfter = _swig_new_instance_method(_Message.Message_ListOfMsg_InsertAfter)278 Reverse = _swig_new_instance_method(_Message.Message_ListOfMsg_Reverse)279 __swig_destroy__ = _Message.delete_Message_ListOfMsg280# Register Message_ListOfMsg in _Message:281_Message.Message_ListOfMsg_swigregister(Message_ListOfMsg)282class Message_ListIteratorOfListOfMsg(object):283 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")284 __repr__ = _swig_repr285 def __init__(self, *args):286 _Message.Message_ListIteratorOfListOfMsg_swiginit(self, _Message.new_Message_ListIteratorOfListOfMsg(*args))287 More = _swig_new_instance_method(_Message.Message_ListIteratorOfListOfMsg_More)288 Next = _swig_new_instance_method(_Message.Message_ListIteratorOfListOfMsg_Next)289 Value = _swig_new_instance_method(_Message.Message_ListIteratorOfListOfMsg_Value)290 ChangeValue = _swig_new_instance_method(_Message.Message_ListIteratorOfListOfMsg_ChangeValue)291 __swig_destroy__ = _Message.delete_Message_ListIteratorOfListOfMsg292# Register Message_ListIteratorOfListOfMsg in _Message:293_Message.Message_ListIteratorOfListOfMsg_swigregister(Message_ListIteratorOfListOfMsg)294class Message_SequenceOfPrinters(object):295 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")296 __repr__ = _swig_repr297 begin = _swig_new_instance_method(_Message.Message_SequenceOfPrinters_begin)298 end = _swig_new_instance_method(_Message.Message_SequenceOfPrinters_end)299 cbegin = _swig_new_instance_method(_Message.Message_SequenceOfPrinters_cbegin)300 cend = _swig_new_instance_method(_Message.Message_SequenceOfPrinters_cend)301 def __init__(self, *args):302 _Message.Message_SequenceOfPrinters_swiginit(self, _Message.new_Message_SequenceOfPrinters(*args))303 Size = _swig_new_instance_method(_Message.Message_SequenceOfPrinters_Size)304 Length = _swig_new_instance_method(_Message.Message_SequenceOfPrinters_Length)305 Lower = _swig_new_instance_method(_Message.Message_SequenceOfPrinters_Lower)306 Upper = _swig_new_instance_method(_Message.Message_SequenceOfPrinters_Upper)307 IsEmpty = _swig_new_instance_method(_Message.Message_SequenceOfPrinters_IsEmpty)308 Reverse = _swig_new_instance_method(_Message.Message_SequenceOfPrinters_Reverse)309 Exchange = _swig_new_instance_method(_Message.Message_SequenceOfPrinters_Exchange)310 delNode = _swig_new_static_method(_Message.Message_SequenceOfPrinters_delNode)311 Clear = _swig_new_instance_method(_Message.Message_SequenceOfPrinters_Clear)312 Assign = _swig_new_instance_method(_Message.Message_SequenceOfPrinters_Assign)313 Set = _swig_new_instance_method(_Message.Message_SequenceOfPrinters_Set)314 Remove = _swig_new_instance_method(_Message.Message_SequenceOfPrinters_Remove)315 Append = _swig_new_instance_method(_Message.Message_SequenceOfPrinters_Append)316 Prepend = _swig_new_instance_method(_Message.Message_SequenceOfPrinters_Prepend)317 InsertBefore = _swig_new_instance_method(_Message.Message_SequenceOfPrinters_InsertBefore)318 InsertAfter = _swig_new_instance_method(_Message.Message_SequenceOfPrinters_InsertAfter)319 Split = _swig_new_instance_method(_Message.Message_SequenceOfPrinters_Split)320 First = _swig_new_instance_method(_Message.Message_SequenceOfPrinters_First)321 ChangeFirst = _swig_new_instance_method(_Message.Message_SequenceOfPrinters_ChangeFirst)322 Last = _swig_new_instance_method(_Message.Message_SequenceOfPrinters_Last)323 ChangeLast = _swig_new_instance_method(_Message.Message_SequenceOfPrinters_ChangeLast)324 Value = _swig_new_instance_method(_Message.Message_SequenceOfPrinters_Value)325 ChangeValue = _swig_new_instance_method(_Message.Message_SequenceOfPrinters_ChangeValue)326 __call__ = _swig_new_instance_method(_Message.Message_SequenceOfPrinters___call__)327 SetValue = _swig_new_instance_method(_Message.Message_SequenceOfPrinters_SetValue)328 __swig_destroy__ = _Message.delete_Message_SequenceOfPrinters329# Register Message_SequenceOfPrinters in _Message:330_Message.Message_SequenceOfPrinters_swigregister(Message_SequenceOfPrinters)331Message_SequenceOfPrinters_delNode = _Message.Message_SequenceOfPrinters_delNode332class Message_SequenceOfProgressScale(object):333 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")334 __repr__ = _swig_repr335 begin = _swig_new_instance_method(_Message.Message_SequenceOfProgressScale_begin)336 end = _swig_new_instance_method(_Message.Message_SequenceOfProgressScale_end)337 cbegin = _swig_new_instance_method(_Message.Message_SequenceOfProgressScale_cbegin)338 cend = _swig_new_instance_method(_Message.Message_SequenceOfProgressScale_cend)339 def __init__(self, *args):340 _Message.Message_SequenceOfProgressScale_swiginit(self, _Message.new_Message_SequenceOfProgressScale(*args))341 Size = _swig_new_instance_method(_Message.Message_SequenceOfProgressScale_Size)342 Length = _swig_new_instance_method(_Message.Message_SequenceOfProgressScale_Length)343 Lower = _swig_new_instance_method(_Message.Message_SequenceOfProgressScale_Lower)344 Upper = _swig_new_instance_method(_Message.Message_SequenceOfProgressScale_Upper)345 IsEmpty = _swig_new_instance_method(_Message.Message_SequenceOfProgressScale_IsEmpty)346 Reverse = _swig_new_instance_method(_Message.Message_SequenceOfProgressScale_Reverse)347 Exchange = _swig_new_instance_method(_Message.Message_SequenceOfProgressScale_Exchange)348 delNode = _swig_new_static_method(_Message.Message_SequenceOfProgressScale_delNode)349 Clear = _swig_new_instance_method(_Message.Message_SequenceOfProgressScale_Clear)350 Assign = _swig_new_instance_method(_Message.Message_SequenceOfProgressScale_Assign)351 Set = _swig_new_instance_method(_Message.Message_SequenceOfProgressScale_Set)352 Remove = _swig_new_instance_method(_Message.Message_SequenceOfProgressScale_Remove)353 Append = _swig_new_instance_method(_Message.Message_SequenceOfProgressScale_Append)354 Prepend = _swig_new_instance_method(_Message.Message_SequenceOfProgressScale_Prepend)355 InsertBefore = _swig_new_instance_method(_Message.Message_SequenceOfProgressScale_InsertBefore)356 InsertAfter = _swig_new_instance_method(_Message.Message_SequenceOfProgressScale_InsertAfter)357 Split = _swig_new_instance_method(_Message.Message_SequenceOfProgressScale_Split)358 First = _swig_new_instance_method(_Message.Message_SequenceOfProgressScale_First)359 ChangeFirst = _swig_new_instance_method(_Message.Message_SequenceOfProgressScale_ChangeFirst)360 Last = _swig_new_instance_method(_Message.Message_SequenceOfProgressScale_Last)361 ChangeLast = _swig_new_instance_method(_Message.Message_SequenceOfProgressScale_ChangeLast)362 Value = _swig_new_instance_method(_Message.Message_SequenceOfProgressScale_Value)363 ChangeValue = _swig_new_instance_method(_Message.Message_SequenceOfProgressScale_ChangeValue)364 __call__ = _swig_new_instance_method(_Message.Message_SequenceOfProgressScale___call__)365 SetValue = _swig_new_instance_method(_Message.Message_SequenceOfProgressScale_SetValue)366 __swig_destroy__ = _Message.delete_Message_SequenceOfProgressScale367# Register Message_SequenceOfProgressScale in _Message:368_Message.Message_SequenceOfProgressScale_swigregister(Message_SequenceOfProgressScale)369Message_SequenceOfProgressScale_delNode = _Message.Message_SequenceOfProgressScale_delNode370class Message_ListOfAlert(object):371 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")372 __repr__ = _swig_repr373 begin = _swig_new_instance_method(_Message.Message_ListOfAlert_begin)374 end = _swig_new_instance_method(_Message.Message_ListOfAlert_end)375 cbegin = _swig_new_instance_method(_Message.Message_ListOfAlert_cbegin)376 cend = _swig_new_instance_method(_Message.Message_ListOfAlert_cend)377 def __init__(self, *args):378 _Message.Message_ListOfAlert_swiginit(self, _Message.new_Message_ListOfAlert(*args))379 Size = _swig_new_instance_method(_Message.Message_ListOfAlert_Size)380 Assign = _swig_new_instance_method(_Message.Message_ListOfAlert_Assign)381 Set = _swig_new_instance_method(_Message.Message_ListOfAlert_Set)382 Clear = _swig_new_instance_method(_Message.Message_ListOfAlert_Clear)383 First = _swig_new_instance_method(_Message.Message_ListOfAlert_First)384 Last = _swig_new_instance_method(_Message.Message_ListOfAlert_Last)385 Append = _swig_new_instance_method(_Message.Message_ListOfAlert_Append)386 Prepend = _swig_new_instance_method(_Message.Message_ListOfAlert_Prepend)387 RemoveFirst = _swig_new_instance_method(_Message.Message_ListOfAlert_RemoveFirst)388 Remove = _swig_new_instance_method(_Message.Message_ListOfAlert_Remove)389 InsertBefore = _swig_new_instance_method(_Message.Message_ListOfAlert_InsertBefore)390 InsertAfter = _swig_new_instance_method(_Message.Message_ListOfAlert_InsertAfter)391 Reverse = _swig_new_instance_method(_Message.Message_ListOfAlert_Reverse)392 __swig_destroy__ = _Message.delete_Message_ListOfAlert393# Register Message_ListOfAlert in _Message:...

Full Screen

Full Screen

exception.py

Source:exception.py Github

copy

Full Screen

1# Copyright European Organization for Nuclear Research (CERN)2#3# Licensed under the Apache License, Version 2.0 (the "License");4# You may not use this file except in compliance with the License.5# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.06#7# Authors:8# - Thomas Beermann, <thomas.beermann@cern.ch> , 20129# - Angelos Molfetas, <angelos.molfetas@cern,ch>, 201210# - Mario Lassnig, <mario.lassnig@cern.ch>, 2012, 2014-201511# - Vincent Garonne, <vincent.garonne@cern.ch>, 2011-201312# - Ralph Vigne, <ralph.vigne@cern.ch>, 2012-201313# - Martin Barisits, <martin.barisits@cern.ch>, 2012-201614# - Cedric Serfon, <cedric.serfon@cern.ch>, 2013-201515# - Wen Guan, <wen.guan@cern.ch>, 201416"""Exceptions used with Rucio.17The base exception class is :class:`. RucioException`.18Exceptions which are raised are all subclasses of it.19"""20from rucio.common.constraints import AUTHORIZED_VALUE_TYPES21class RucioException(Exception):22 """23 To correctly use this class, inherit from it and define24 a 'message' property. That message will get printf'd25 with the keyword arguments provided to the constructor.26 """27 def __init__(self, *args, **kwargs):28 super(RucioException, self).__init__(args, kwargs)29 self._message = "An unknown exception occurred."30 self.args = args31 self.kwargs = kwargs32 self._error_string = None33 def __str__(self):34 try:35 self._error_string = self._message % self.kwargs36 except Exception:37 # at least get the core message out if something happened38 self._error_string = self._message39 if len(self.args) > 0:40 # If there is a non-kwarg parameter, assume it's the error41 # message or reason description and tack it on to the end42 # of the exception message43 # Convert all arguments into their string representations...44 args = ["%s" % arg for arg in self.args if arg]45 self._error_string = (self._error_string + "\nDetails: %s" % '\n'.join(args))46 return self._error_string.strip()47# Please insert new exceptions in alphabetic order48class AccessDenied(RucioException):49 """50 AccessDenied51 """52 def __init__(self, *args, **kwargs):53 super(AccessDenied, self).__init__(args, kwargs)54 self._message = "Access to the requested resource denied."55class AccountNotFound(RucioException):56 """57 AccountNotFound58 """59 def __init__(self, *args, **kwargs):60 super(AccountNotFound, self).__init__(args, kwargs)61 self._message = "Account does not exist."62class CannotAuthenticate(RucioException):63 """64 CannotAuthenticate65 """66 def __init__(self, *args, **kwargs):67 super(CannotAuthenticate, self).__init__(args, kwargs)68 self._message = "Cannot authenticate."69class ClientParameterMismatch(RucioException):70 """71 RucioException72 """73 def __init__(self, *args, **kwargs):74 super(ClientParameterMismatch, self).__init__(args, kwargs)75 self._message = "Client parameters don\'t match."76class ClientProtocolNotSupported(RucioException):77 """78 RucioException79 """80 def __init__(self, *args, **kwargs):81 super(ClientProtocolNotSupported, self).__init__(args, kwargs)82 self._message = "Client protocol not supported."83class ConfigNotFound(RucioException):84 """85 RucioException86 """87 def __init__(self, *args, **kwargs):88 super(ConfigNotFound, self).__init__(args, kwargs)89 self._message = "Configuration not found."90class ConfigurationError(RucioException):91 """92 RucioException93 """94 def __init__(self, *args, **kwargs):95 super(ConfigurationError, self).__init__(args, kwargs)96 self._message = "Error during configuration."97class CounterNotFound(RucioException):98 """99 RucioException100 """101 def __init__(self, *args, **kwargs):102 super(CounterNotFound, self).__init__(args, kwargs)103 self._message = "The requested counter does not exist."104class DatabaseException(RucioException):105 """106 RucioException107 """108 def __init__(self, *args, **kwargs):109 super(DatabaseException, self).__init__(args, kwargs)110 self._message = "Database exception."111class DataIdentifierAlreadyExists(RucioException):112 """113 RucioException114 """115 def __init__(self, *args, **kwargs):116 super(DataIdentifierAlreadyExists, self).__init__(args, kwargs)117 self._message = "Data Identifier Already Exists."118class DataIdentifierNotFound(RucioException):119 """120 RucioException121 """122 def __init__(self, *args, **kwargs):123 super(DataIdentifierNotFound, self).__init__(args, kwargs)124 self._message = "Data identifier not found."125class DestinationNotAccessible(RucioException):126 """127 RucioException128 """129 def __init__(self, *args, **kwargs):130 super(DestinationNotAccessible, self).__init__(args, kwargs)131 self._message = "Access to local destination denied."132class Duplicate(RucioException):133 """134 RucioException135 """136 def __init__(self, *args, **kwargs):137 super(Duplicate, self).__init__(args, kwargs)138 self._message = "An object with the same identifier already exists."139class DuplicateContent(RucioException):140 """141 RucioException142 """143 def __init__(self, *args, **kwargs):144 super(DuplicateContent, self).__init__(args, kwargs)145 self._message = "Data identifier already added to the destination content."146class DuplicateRule(RucioException):147 """148 RucioException149 """150 def __init__(self, *args, **kwargs):151 super(DuplicateRule, self).__init__(args, kwargs)152 self._message = "A duplicate rule for this account, did, rse_expression, copies already exists."153class ErrorLoadingCredentials(RucioException):154 """155 RucioException156 """157 def __init__(self, *args, **kwargs):158 super(ErrorLoadingCredentials, self).__init__(args, kwargs)159 self._message = "Unable to to load user credentials."160class FileAlreadyExists(RucioException):161 """162 RucioException163 """164 def __init__(self, *args, **kwargs):165 super(FileAlreadyExists, self).__init__(args, kwargs)166 self._message = "The file already exists."167class FileConsistencyMismatch(RucioException):168 """169 RucioException170 """171 def __init__(self, *args, **kwargs):172 super(FileConsistencyMismatch, self).__init__(args, kwargs)173 self._message = "Error related to file consistency."174class FileReplicaAlreadyExists(RucioException):175 """176 RucioException177 """178 def __init__(self, *args, **kwargs):179 super(FileReplicaAlreadyExists, self).__init__(args, kwargs)180 self._message = "File name in specified scope already exists"181class ReplicaNotFound(RucioException):182 """183 RucioException184 """185 def __init__(self, *args, **kwargs):186 super(ReplicaNotFound, self).__init__(args, kwargs)187 self._message = "Replica not found"188class ReplicaUnAvailable(RucioException):189 """190 RucioException191 """192 def __init__(self, *args, **kwargs):193 super(ReplicaUnAvailable, self).__init__(args, kwargs)194 self._message = "Replica unavailable"195class FullStorage(RucioException):196 """197 RucioException198 """199 def __init__(self, *args, **kwargs):200 super(FullStorage, self).__init__(args, kwargs)201 self._message = "The Referenced storage is out of disk space."202class IdentityError(RucioException):203 """204 RucioException205 """206 def __init__(self, *args, **kwargs):207 super(IdentityError, self).__init__(args, kwargs)208 self._message = "Identity error."209class IdentityNotFound(RucioException):210 def __init__(self, *args, **kwargs):211 super(IdentityNotFound, self).__init__(args, kwargs)212 self._message = "This identity does not exist."213class InputValidationError(RucioException):214 """215 RucioException216 """217 def __init__(self, *args, **kwargs):218 super(InputValidationError, self).__init__(args, kwargs)219 self._message = "There is an error with one of the input parameters."220class InsufficientAccountLimit(RucioException):221 """222 RucioException223 """224 def __init__(self, *args, **kwargs):225 super(InsufficientAccountLimit, self).__init__(args, kwargs)226 self._message = "There is not enough quota left to fulfil the operation."227class InsufficientTargetRSEs(RucioException):228 """229 RucioException230 """231 def __init__(self, *args, **kwargs):232 super(InsufficientTargetRSEs, self).__init__(args, kwargs)233 self._message = "There are not enough target RSEs to fulfil the request at this time."234class InvalidMetadata(RucioException):235 """236 RucioException237 """238 def __init__(self, *args, **kwargs):239 super(InvalidMetadata, self).__init__(args, kwargs)240 self._message = "Provided metadata is considered invalid."241class InvalidObject(RucioException):242 """243 RucioException244 """245 def __init__(self, *args, **kwargs):246 super(InvalidObject, self).__init__(args, kwargs)247 self._message = "Provided object does not match schema."248class InvalidReplicationRule(RucioException):249 """250 RucioException251 """252 def __init__(self, *args, **kwargs):253 super(InvalidReplicationRule, self).__init__(args, kwargs)254 self._message = "Provided replication rule is considered invalid."255class InvalidRSEExpression(RucioException):256 """257 RucioException258 """259 def __init__(self, *args, **kwargs):260 super(InvalidRSEExpression, self).__init__(args, kwargs)261 self._message = "Provided RSE expression is considered invalid."262class InvalidRuleWeight(RucioException):263 """264 RucioException265 """266 def __init__(self, *args, **kwargs):267 super(InvalidRuleWeight, self).__init__(args, kwargs)268 self._message = "An invalid weight value/type is used for an RSE."269class InvalidType(RucioException):270 """271 RucioException272 """273 def __init__(self, *args, **kwargs):274 super(InvalidType, self).__init__(args, kwargs)275 self._message = "Provided type is considered invalid."276class InvalidValueForKey(RucioException):277 """278 RucioException279 """280 def __init__(self, *args, **kwargs):281 super(InvalidValueForKey, self).__init__(args, kwargs)282 self._message = "Invalid value for the key."283class InvalidRequest(RucioException):284 """285 RucioException286 """287 def __init__(self, *args, **kwargs):288 super(InvalidRequest, self).__init__(args, kwargs)289 self._message = "Request is considered invalid."290class InvalidPath(RucioException):291 """292 RucioException293 """294 def __init__(self, *args, **kwargs):295 super(InvalidPath, self).__init__(args, kwargs)296 self._message = "The path provided is invalid."297class KeyNotFound(RucioException):298 """299 RucioException300 """301 def __init__(self, *args, **kwargs):302 super(KeyNotFound, self).__init__(args, kwargs)303 self._message = "Key does not exist."304class ManualRuleApprovalBlocked(RucioException):305 """306 RucioException307 """308 def __init__(self, *args, **kwargs):309 super(ManualRuleApprovalBlocked, self).__init__(args, kwargs)310 self._message = "Manual rule approval is blocked on this RSE."311class MissingClientParameter(RucioException):312 """313 RucioException314 """315 def __init__(self, *args, **kwargs):316 super(MissingClientParameter, self).__init__(args, kwargs)317 self._message = "Client parameters are missing."318class MissingDependency(RucioException):319 """320 RucioException321 """322 def __init__(self, *args, **kwargs):323 super(MissingDependency, self).__init__(args, kwargs)324 self._message = "One dependency is missing."325class MissingSourceReplica(RucioException):326 """327 RucioException328 """329 def __init__(self, *args, **kwargs):330 super(MissingSourceReplica, self).__init__(args, kwargs)331 self._message = "Source replicas are missing to fulfil the request at this moment."332class NameTypeError(RucioException):333 """334 RucioException335 """336 def __init__(self, *args, **kwargs):337 super(NameTypeError, self).__init__(args, kwargs)338 self._message = "Name is of the wrong type"339class NoAuthInformation(RucioException):340 """341 RucioException342 """343 def __init__(self, *args, **kwargs):344 super(NoAuthInformation, self).__init__(args, kwargs)345 self._message = "No authentication information passed."346class ReplicationRuleCreationTemporaryFailed(RucioException):347 """348 RucioException349 """350 def __init__(self, *args, **kwargs):351 super(ReplicationRuleCreationTemporaryFailed, self).__init__(args, kwargs)352 self._message = "The creation of the replication rule failed at this time. Please try again later."353class RequestNotFound(RucioException):354 def __init__(self, *args, **kwargs):355 super(RequestNotFound, self).__init__(args, kwargs)356 self._message = "A request for this DID and RSE does not exist."357class RSEAccessDenied(RucioException):358 """359 RucioException360 """361 def __init__(self, *args, **kwargs):362 super(RSEAccessDenied, self).__init__(args, kwargs)363 self._message = "Referenced RSE not reachable."364class RSEBlacklisted(RucioException):365 """366 RucioException367 """368 def __init__(self, *args, **kwargs):369 super(RSEBlacklisted, self).__init__(args, kwargs)370 self._message = "RSE excluded due to write blacklisting."371class RSENotConnected(RucioException):372 """373 RucioException374 """375 def __init__(self, *args, **kwargs):376 super(RSENotConnected, self).__init__(args, kwargs)377 self._message = "Connection to RSE not established."378class RSENotFound(RucioException):379 """380 RucioException381 """382 def __init__(self, *args, **kwargs):383 super(RSENotFound, self).__init__(args, kwargs)384 self._message = "RSE does not exist."385class RSEProtocolNotSupported(RucioException):386 """387 RucioException388 """389 def __init__(self, *args, **kwargs):390 super(RSEProtocolNotSupported, self).__init__(args, kwargs)391 self._message = "RSE does not support requested protocol."392class RSEProtocolPriorityError(RucioException):393 """394 RucioException395 """396 def __init__(self, *args, **kwargs):397 super(RSEProtocolPriorityError, self).__init__(args, kwargs)398 self._message = "RSE does not support provided protocol priority for protocol."399class RSEProtocolDomainNotSupported(RucioException):400 """401 RucioException402 """403 def __init__(self, *args, **kwargs):404 super(RSEProtocolDomainNotSupported, self).__init__(args, kwargs)405 self._message = "RSE does not support requested protocol scope."406class RSEOperationNotSupported(RucioException):407 """408 RucioException409 """410 def __init__(self, *args, **kwargs):411 super(RSEOperationNotSupported, self).__init__(args, kwargs)412 self._message = "RSE does not support requested operation."413class RSEFileNameNotSupported(RucioException):414 """415 RucioException416 """417 def __init__(self, *args, **kwargs):418 super(RSEFileNameNotSupported, self).__init__(args, kwargs)419 self._message = "RSE does not support provided filename."420class RSEOverQuota(RucioException):421 """422 RucioException423 """424 def __init__(self, *args, **kwargs):425 super(RSEOverQuota, self).__init__(args, kwargs)426 self._message = "Quota of Referenced RSE is exceeded."427class ResourceTemporaryUnavailable(RucioException):428 """429 RucioException430 """431 def __init__(self, *args, **kwargs):432 super(ResourceTemporaryUnavailable, self).__init__(args, kwargs)433 self._message = "The resource is temporary not available."434class RuleNotFound(RucioException):435 """436 RucioException437 """438 def __init__(self, *args, **kwargs):439 super(RuleNotFound, self).__init__(args, kwargs)440 self._message = "No replication rule found."441class RuleReplaceFailed(RucioException):442 """443 RucioException444 """445 def __init__(self, *args, **kwargs):446 super(RuleReplaceFailed, self).__init__(args, kwargs)447 self._message = "The replace operation for the rule failed."448class ScratchDiskLifetimeConflict(RucioException):449 """450 RucioException451 """452 def __init__(self, *args, **kwargs):453 super(ScratchDiskLifetimeConflict, self).__init__(args, kwargs)454 self._message = "The requested replication rule exceeds the maximum SCRATCHDISK lifetime of 15 days."455class ServiceUnavailable(RucioException):456 """457 RucioException458 """459 def __init__(self, *args, **kwargs):460 super(ServiceUnavailable, self).__init__(args, kwargs)461 self._message = "The requested service is not available at the moment."462class ScopeAccessDenied(RucioException):463 """464 RucioException465 """466 def __init__(self, *args, **kwargs):467 super(ScopeAccessDenied, self).__init__(args, kwargs)468 self._message = "Access to Referenced scope denied."469class ScopeNotFound(RucioException):470 """471 RucioException472 """473 def __init__(self, *args, **kwargs):474 super(ScopeNotFound, self).__init__(args, kwargs)475 self._message = "Scope does not exist."476class SourceAccessDenied(RucioException):477 """478 RucioException479 """480 def __init__(self, *args, **kwargs):481 super(SourceAccessDenied, self).__init__(args, kwargs)482 self._message = "Access to local source file denied."483class SourceNotFound(RucioException):484 """485 RucioException486 """487 def __init__(self, *args, **kwargs):488 super(SourceNotFound, self).__init__(args, kwargs)489 self._message = "Source file not found."490class StagingAreaRuleRequiresLifetime(RucioException):491 """492 RucioException493 """494 def __init__(self, *args, **kwargs):495 super(StagingAreaRuleRequiresLifetime, self).__init__(args, kwargs)496 self._message = "A rule involving a staging area requires a lifetime!"497class SubscriptionDuplicate(RucioException):498 """499 RucioException500 """501 def __init__(self, *args, **kwargs):502 super(SubscriptionDuplicate, self).__init__(args, kwargs)503 self._message = "A subscription with the same identifier already exists."504class SubscriptionNotFound(RucioException):505 """506 RucioException507 """508 def __init__(self, *args, **kwargs):509 super(SubscriptionNotFound, self).__init__(args, kwargs)510 self._message = "Subscription not found."511class UnsupportedOperation(RucioException):512 """513 RucioException514 """515 def __init__(self, *args, **kwargs):516 super(UnsupportedOperation, self).__init__(args, kwargs)517 self._message = "The resource doesn't support the requested operation."518class UnsupportedStatus(RucioException):519 """520 RucioException521 """522 def __init__(self, *args, **kwargs):523 super(UnsupportedStatus, self).__init__(args, kwargs)524 self._message = "Unsupported data identifier status."525class UnsupportedValueType(RucioException):526 """527 RucioException528 """529 def __init__(self, *args, **kwargs):530 super(UnsupportedValueType, self).__init__(args, kwargs)...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run pandera automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful