
    %j	                         d dl mZmZmZ d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 )    )OptionalListAnyax  {converter} recognized the input as a potential {extension} file, but the dependencies needed to read {extension} files have not been installed. To resolve this error, include the optional dependency [{feature}] or [all] when installing MarkItDown. For example:

* pip install markitdown[{feature}]
* pip install markitdown[all]
* pip install markitdown[{feature}, ...]
* etc.c                       e Zd ZdZdS )MarkItDownExceptionz.
    Base exception class for MarkItDown.
    N__name__
__module____qualname____doc__     ^/home/rurouni/.hermes/hermes-agent/venv/lib/python3.11/site-packages/markitdown/_exceptions.pyr   r                	Dr   r   c                       e Zd ZdZdS )MissingDependencyExceptiona  
    Converters shipped with MarkItDown may depend on optional
    dependencies. This exception is thrown when a converter's
    convert() method is called, but the required dependency is not
    installed. This is not necessarily a fatal error, as the converter
    will simply be skipped (an error will bubble up only if no other
    suitable converter is found).

    Error messages should clearly indicate which dependency is missing.
    Nr   r   r   r   r   r      s        	 	 	Dr   r   c                       e Zd ZdZdS )UnsupportedFormatExceptionzI
    Thrown when no suitable converter was found for the given file.
    Nr   r   r   r   r   r   "   r   r   r   c                   0    e Zd ZdZddedee         fdZdS )FailedConversionAttemptz;
    Represents an a single attempt to convert a file.
    N	converterexc_infoc                 "    || _         || _        d S N)r   r   )selfr   r   s      r   __init__z FailedConversionAttempt.__init__/   s    " r   r   )r	   r
   r   r   r   r   tupler   r   r   r   r   r   *   sI         ! !# !% ! ! ! ! ! !r   r   c                   V     e Zd ZdZ	 	 ddee         deee                  f fdZ xZ	S )FileConversionExceptionzj
    Thrown when a suitable converter was found, but the conversion
    process fails for any reason.
    Nmessageattemptsc           	      h   || _         ||d}ndt          |           d}|D ]k}|j        !|dt          |j                  j         dz  }*|dt          |j                  j         d|j        d         j         d	|j        d
          dz  }lt                                          |           d S )NzFile conversion failed.zFile conversion failed after z attempts:
z -  z provided no execution info.z - z threw r   z with message:    
)r!   lenr   typer   r	   superr   )r   r    r!   attempt	__class__s       r   r   z FileConversionException.__init__:   s
   
 !?3U#h--UUU' W WG'/#h$w/@*A*A*J#h#h#hh  $Wg.?)@)@)I  $W  $WRYRbcdReRn  $W  $W  @G  @P  QR  @S  $W  $W  $W  W!!!!!r   )NN)
r	   r
   r   r   r   strr   r   r   __classcell__)r)   s   @r   r   r   4   su          "&<@" "#" 4 789" " " " " " " " " "r   r   N)typingr   r   r   MISSING_DEPENDENCY_MESSAGE	Exceptionr   r   r   objectr   r   r   r   r   <module>r0      s
   & & & & & & & & & &
 	 	 	 	 	) 	 	 		 	 	 	 	!4 	 	 		 	 	 	 	!4 	 	 	! ! ! ! !f ! ! !" " " " "1 " " " " "r   