*L iGddeZGddeZGddeZGddeZGdd eZGd d eZGd d eZGddeZ y)c eZdZy) PlotlyErrorN__name__ __module__ __qualname__^/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/_plotly_utils/exceptions.pyrrr rc eZdZy)PlotlyEmptyDataErrorNrrr r r r r r r c&eZdZdfd ZdZxZS)PlotlyGraphObjectErrorcv||_||_t||_||_t t ||y)a General graph object error for validation failures. :param (str|unicode) message: The error message. :param (iterable) path: A path pointing to the error. :param notes: Add additional notes, but keep default exception message. N)message plain_messagelistpathnotessuperr__init__)selfrrr __class__s r rzPlotlyGraphObjectError.__init__ s6 $J   $d4W=r c|jddjd|jDzdzdj|jd}djdi|S) z6This is called by Python to present the error message.[z][c32K|]}t|ywN)repr).0ks r z1PlotlyGraphObjectError.__str__..s#?DG#?s] rrrz){message} Path To Error: {path} {notes}r)rjoinrrformat)r format_dicts r __str__zPlotlyGraphObjectError.__str__s\||$))#?TYY#???#EYYtzz* F>EET TTr )rr)rrrrr( __classcell__rs@r rr s >Ur rc eZdZdfd ZxZS)PlotlyDictKeyErrorc|d|jd}djdi|}|jdgt|z}tt ||||y) 3See PlotlyGraphObjectError.__init__ for param docs. attribute object_namez/'{attribute}' is not allowed in '{object_name}'T return_helpr$Nr)_namer&helprrr-rrobjrrr'rrs r rzPlotlyDictKeyError.__init__$sj$(HSYYG JCJJ  d+,tE{:  $0$e 1 r rrrrrr*r+s@r r-r-#    r r-c eZdZdfd ZxZS)PlotlyDictValueErrorc|d|jd}djdi|}|j|ddgt|z}tt ||||y) r/r0r1z6'{attribute}' has invalid value inside '{object_name}'Tr4)rrrNr)r6r&r7rrr>rr8s r rzPlotlyDictValueError.__init__1sp$(HSYYG QJQQ  $r(56eD "D25t 3 r r:r;r+s@r r>r>0r<r r>c eZdZdfd ZxZS)PlotlyListEntryErrorc|d|jd}djdi|}|jdgt|z}tt ||||y) r/r0indexr3:Invalid entry found in '{object_name}' at index, '{index}'Tr4r$Nr)r6r&r7rrrArr8s r rzPlotlyListEntryError.__init__>sj $RC UNUU  d+,tE{: "D2$e 3 r r:r;r+s@r rArA=r<r rAc eZdZdfd ZxZS)PlotlyDataTypeErrorc|d|jd}djdi|}d}|gt|z}tt||||y)r/r0rCrEz=It's invalid because it doesn't contain a valid 'type' value.r$Nr)r6r&rrrGr)rr9rrr'rnoters r rzPlotlyDataTypeError.__init__Ksd $RC UNUU  Oe$ !41$e 2 r r:r;r+s@r rGrGJs    r rGceZdZdZdZy)PlotlyKeyErrora KeyErrors are not printed as beautifully as other errors (this is so that {}[''] prints "KeyError: ''" and not "KeyError:"). So here we use LookupError's __str__ to make a PlotlyKeyError object which will print nicer error messages for KeyErrors. c,tj|Sr) LookupErrorr()rs r r(zPlotlyKeyError.__str__`s""4((r N)rrr__doc__r(rr r rKrKXs )r rKN) Exceptionrr rr-r>rArGKeyErrorrKrr r rQsk )  ; U[U4  /    1    1    0   )X )r