
    9i                         / S Qr SS jr " S S\5      r " S S\5      r " S S\5      r " S	 S
\5      r " S S\5      r " S S\5      rS r	g))build_res_dictCheckFailedErrorConvertFailedErrorSplitFailedErrorAnalyseFailedErrorDatasetFileNotFoundErrorNc                     U (       a1  Ub  [        SU  S35      eUb  [        SU  S35      e[        S	SU 0UD6$ Uc  [        SU  S35      eUc!  [        U5      (       a  SnO[        U S35      e[        S	XUS.UD6$ )
z+build the dataset checking result to returnz`check_pass` is z, but `err_type` is not None.z, but `err_msg` is not None.
check_passz, but `err_type` is None. za is not a known error type, in which case `err_msg` must be specified to a value other than None.)r	   err_typeerr_msg )
ValueErrordict_is_known_error_type)r	   r   r   kwargss       j/var/www/html/land-doc-ocr/venv/lib/python3.13/site-packages/paddlex/modules/base/dataset_checker/utils.pyr   r      s    ":,.KL  ":,.JK  4z4V44/
|;TUVV?#H-- j !   XzgXQWXX    c                   6   ^  \ rS rSrSrSU 4S jjrS rSrU =r$ )FailedError4   zbase error classc                 L   > Uc  U R                  X5      n[        TU ]	  U5        g )N)_construct_messagesuper__init__)selferr_infosolutionmessage	__class__s       r   r   FailedError.__init__7   s%    ?--hAG!r   c                 F    Uc  gU R                    SU 3nUb  USU 3-  nU$ )Nr
   z/ failed. We encountered the following error:
  z/
Please try to resolve the issue as follows:
  )mode)r   r   r   msgs       r   r   FailedError._construct_message<   sD     99+MhZX  #J8*UUJr   r   )NNN)	__name__
__module____qualname____firstlineno____doc__r   r   __static_attributes____classcell__r   s   @r   r   r   4   s    "
	 	r   r   c                       \ rS rSrSrSrSrg)r   H   zcheck dataset errorzCheck datasetr   Nr%   r&   r'   r(   r)   r"   r*   r   r   r   r   r   H   
    Dr   r   c                       \ rS rSrSrSrSrg)r   N   zconvert dataset errorzConvert datasetr   Nr/   r   r   r   r   r   N   
    Dr   r   c                       \ rS rSrSrSrSrg)r   T   zsplit dataset errorzSplit datasetr   Nr/   r   r   r   r   r   T   r0   r   r   c                       \ rS rSrSrSrSrg)r   Z   zanalyse dataset errorzAnalyse datasetr   Nr/   r   r   r   r   r   Z   r3   r   r   c                   0   ^  \ rS rSrSrSU 4S jjrSrU =r$ )r   `   zdataset file not found errorc                 <   > Uc  Ub  U S3n[         TU ]  X#U5        g )Nz does not exist.)r   r   )r   	file_pathr   r   r   r   s        r   r   !DatasetFileNotFoundError.__init__c   s+    $'[(89W5r   r   )NNNN)r%   r&   r'   r(   r)   r   r*   r+   r,   s   @r   r   r   `   s    &6 6r   r   c                 "    [        U [        5      $ )zis known error type)
isinstancer   )r   s    r   r   r   j   s    h 011r   )NN)
__all__r   	Exceptionr   r   r   r   r   r   r   r   r   r   <module>rA      s`    Y4) ({  {  6/ 62r   