
    -Ph                          G d  de           Z G d de          Z G d de          Z G d de          Z G d d	e          Z G d
 de          Z G d de          Z G d de          Z	dS )c                       e Zd ZdS )PlotlyErrorN__name__
__module____qualname__     X/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/_plotly_utils/exceptions.pyr   r              Dr	   r   c                       e Zd ZdS )PlotlyEmptyDataErrorNr   r   r	   r
   r   r      r   r	   r   c                   &     e Zd Zd fd	Zd Z xZS )PlotlyGraphObjectError r   c                     || _         || _        t          |          | _        || _        t          t          |                               |           dS )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_messagelistpathnotessuperr   __init__)selfr   r   r   	__class__s       r
   r   zPlotlyGraphObjectError.__init__
   sM     $JJ	
$d++44W=====r	   c                     | j         dd                    d | j        D                       z   dz   d                    | j                  d} dj        di |S )	z6This is called by Python to present the error message.[z][c              3   4   K   | ]}t          |          V  d S N)repr).0ks     r
   	<genexpr>z1PlotlyGraphObjectError.__str__.<locals>.<genexpr>   s(      #?#?DGG#?#?#?#?#?#?r	   ]
r   r   r   z){message}

Path To Error: {path}

{notes}r   )r   joinr   r   format)r   format_dicts     r
   __str__zPlotlyGraphObjectError.__str__   sm     |$))#?#?TY#?#?#????#EYYtz**
 

 F>ETTTTTr	   )r   r   r   )r   r   r   r   r)   __classcell__r   s   @r
   r   r   	   sS        > > > > > >U U U U U U Ur	   r   c                         e Zd Zd fd	Z xZS )PlotlyDictKeyErrorr   c                     |d         |j         d} dj        di |}|                    d          gt          |          z   }t	          t
          |                               |||           dS )	3See PlotlyGraphObjectError.__init__ for param docs.	attributeobject_namez/'{attribute}' is not allowed in '{object_name}'Treturn_helpr%   Nr   )_namer'   helpr   r   r-   r   r   objr   r   r(   r   r   s         r
   r   zPlotlyDictKeyError.__init__$   s    $(HSYGGJCJ 
 

 
 d++,tE{{: $''00$e 	1 	
 	
 	
 	
 	
r	   r   r   r   r   r   r*   r+   s   @r
   r-   r-   #   =        	
 	
 	
 	
 	
 	
 	
 	
 	
 	
r	   r-   c                         e Zd Zd fd	Z xZS )PlotlyDictValueErrorr   c                     |d         |j         d} dj        di |}|                    |d         d          gt          |          z   }t	          t
          |                               |||           dS )	r/   r0   r1   z6'{attribute}' has invalid value inside '{object_name}'Tr4   )r   r   r   Nr   )r6   r'   r7   r   r   r>   r   r8   s         r
   r   zPlotlyDictValueError.__init__1   s    $(HSYGGQJQ 
 

 
 $r(556eD"D))225t 	3 	
 	
 	
 	
 	
r	   r:   r;   r+   s   @r
   r>   r>   0   r<   r	   r>   c                         e Zd Zd fd	Z xZS )PlotlyListEntryErrorr   c                     |d         |j         d} dj        di |}|                    d          gt          |          z   }t	          t
          |                               |||           dS )	r/   r0   indexr3   :Invalid entry found in '{object_name}' at index, '{index}'Tr4   r%   Nr   )r6   r'   r7   r   r   rA   r   r8   s         r
   r   zPlotlyListEntryError.__init__>   s     $RCCUNU 
 

 
 d++,tE{{:"D))22$e 	3 	
 	
 	
 	
 	
r	   r:   r;   r+   s   @r
   rA   rA   =   r<   r	   rA   c                         e Zd Zd fd	Z xZS )PlotlyDataTypeErrorr   c                     |d         |j         d} dj        di |}d}|gt          |          z   }t          t          |                               |||           dS )r/   r0   rC   rE   z=It's invalid because it doesn't contain a valid 'type' value.r%   Nr   )r6   r'   r   r   rG   r   )r   r9   r   r   r(   r   noter   s          r
   r   zPlotlyDataTypeError.__init__K   s     $RCCUNU 
 

 
 Oe$!4((11$e 	2 	
 	
 	
 	
 	
r	   r:   r;   r+   s   @r
   rG   rG   J   s=        

 

 

 

 

 

 

 

 

 

r	   rG   c                       e Zd ZdZd ZdS )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                 6    t                               |           S r   )LookupErrorr)   )r   s    r
   r)   zPlotlyKeyError.__str__`   s    ""4(((r	   N)r   r   r   __doc__r)   r   r	   r
   rK   rK   X   s-         ) ) ) ) )r	   rK   N)
	Exceptionr   r   r   r-   r>   rA   rG   KeyErrorrK   r   r	   r
   <module>rQ      sk  	 	 	 	 	) 	 	 		 	 	 	 	; 	 	 	U U U U U[ U U U4

 

 

 

 

/ 

 

 



 

 

 

 

1 

 

 



 

 

 

 

1 

 

 


 
 
 
 
0 
 
 
	) 	) 	) 	) 	)X 	) 	) 	) 	) 	)r	   