
    z%i0                        	 d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dlZd dl	Z	d dl
Z
d dlmZ  e
j                  ed       d Zg Zd Zd Zd Zd	 Zd
 ZddZddZ G d d      Z e       j2                  ZddZy)    N)escape)      )removec                       	 y)Na'  <!--: spam
Content-Type: text/html

<body bgcolor="#f0f0f8"><font color="#f0f0f8" size="-5"> -->
<body bgcolor="#f0f0f8"><font color="#f0f0f8" size="-5"> --> -->
</font> </font> </font> </script> </object> </blockquote> </pre>
</table> </table> </table> </table> </table> </font> </font> </font> r       9/home/uftp/.pyenv/versions/3.12.0/lib/python3.12/cgitb.pyresetr   (   s    KHr	   c                     | rd| z   dz   S y)Nz<small>z</small> r   texts    r
   smallr   3   s    4*,,r	   c                     | rd| z   dz   S y)Nz<strong>z	</strong>r   r   r   s    r
   strongr   9   s    D ;..r	   c                     | rd| z   dz   S y)Nz<font color="#909090">z</font>r   r   r   s    r
   greyr   ?   s    '$.::r	   c                    	 | |v rd||    fS | |j                   v rd|j                   |    fS d|j                   v rL|j                   d   }t        |t              r| |v rd||    fS d t
        fS t        ||       rdt	        ||       fS d t
        fS )Nlocalglobal__builtins__builtin)	f_globals
isinstancedicthasattrgetattr	__UNDEF__)nameframelocalsbuiltinss       r
   lookupr$   E   s    Cv~t$$u...(??>2h%x (4.00 ? x& '(D"999?r	   c                    	 g d d dt         f\  }}}}}t        j                  |       D ]  \  }}	}
}}|t        j                  k(  r |S |t        j                  k(  rm|	t
        j                  vr[|dk(  r1|t         urct        ||	t               }|j                  ||	z   ||f       n:t        |	||      \  }}|j                  |	||f       n|	dk(  r||dz   z  }|}nd\  }}|	} |S )Nr   .)Nr   )
r   tokenizegenerate_tokensNEWLINENAMEkeywordkwlistr   appendr$   )readerr!   r"   vars	lasttokenparentprefixvaluettypetokenstartendlinewheres                 r
   scanvarsr:   U   s    O-/tR-J*D)VVU*2*B*B6*J &ueS$H$$$e K HMM!e7>>&AC*#FE9=EKK% ?@%eUF;uUE512c\i#o%FF%NFF	  Kr	   c                 \	  "# 	 | \  }}}t        |t              r|j                  }dt        j                  j                         d   z   dz   t        j                  z   }t        j                  t        j                               }dt        t        |             d| d| d}dt        d	      z   d
z   }g }	t        j                  ||      }
|
D ]  \  }"}}}}"rFt        j                  j!                  "      "d"dt"        j$                  j'                  "      d}ndx"}t        j(                  |      \  }}}}d}|dk7  rNdt+        t"        j$                  j'                  |            z   }|dk7  r|t        j,                  ||||d       z  }i #|gf"#fd	}t/        |||      }dd|d|dg}|||z
  }|D ]  }t        ddt1        t        |            z
  z  t        |      z         dz   }|#v r:d|t"        j$                  j3                  |      d}|j5                  d|z         nBd|t"        j$                  j3                  |      d}|j5                  dt7        |      z         |d z  } i g }}|D ]  \  }}} ||v rd ||<   | t8        ur{|d!v rd"|z  t+        |      z   }n1|d#k(  rt+        |      }n |t+        |j                  d$      d%         z   }|j5                  |d&t"        j$                  j;                  |              |j5                  |d'z           |j5                  dt        t7        d(j=                  |                  z         |	j5                  d)d*j=                  |      z          d+t+        t"        j$                  j'                  t        |                  dt"        j$                  j'                  t        |            g}!t?        |      D ]M  }|d d  d,k(  rt"        j$                  j;                  tA        ||            } |!j5                  d-||d.|        O |dj=                  |	      z   dj=                  |!      z   d/t"        j$                  j'                  dj=                  tC        jD                  |||                  z  z   S )0NPython r   : z
<body bgcolor="#f0f0f8">
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#6622aa">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br>
<big><big><strong>zo</strong></big></big></font></td>
<td align=right valign=bottom>
<font color="#ffffff" face="helvetica, arial">z<br>z</font></td>
</tr></table>
<p>A problem occurred in a Python script.  Here is the sequence of
function calls leading up to the error, in the order they occurred.</p>z<tt>z&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;z&nbsp;</tt>z<a href="file://z">z</a>?r   in <module>c                 F    dt         j                  j                  |       z   S N=)pydochtmlreprr3   s    r
   <lambda>zhtml.<locals>.<lambda>       cEJJOOE4J.J r	   formatvaluec                     d| d   <   t        j                  | d         | dxx   dz  cc<   S # | dxx   dz  cc<   w xY wN   r   	linecachegetlinelnumfile	highlights    r
   r.   zhtml.<locals>.reader   @    !"Id1g!))$Q8!W\WT!W\W   0 ?z<tr><td bgcolor="#d8bbff">z<big>&nbsp;</big> z
</td></tr>z&nbsp;   z	<tt>=&gt;z</tt>z&<tr><td bgcolor="#ffccee">%s</td></tr>z<tt>&nbsp;&nbsp;z<tr><td>%s</td></tr>rN   )r   r   z<em>%s</em> r   r&   z&nbsp;= z <em>undefined</em>z, zF
<table width="100%%" cellspacing=0 cellpadding=0 border=0>
%s</table>
z<p>_z
<br>z&nbsp;=
z


<!-- The above is a description of an error in a Python program, formatted
     for a web browser because the 'cgitb' module was enabled.  In case you
     are not reading this in a web browser, here is the original traceback:

%s
-->
)#r   type__name__sysversionsplit
executabletimectimehtml_escapestrr   inspectgetinnerframesospathabspathrD   rE   r   getargvaluesr   formatargvaluesr:   len	preformatr-   r   r   rF   joindirr   	tracebackformat_exception)$einfocontextetypeevalueetbpyverdateheadindentframesrecordsr!   rS   funclinesindexlinkargsvarargsvarkwr"   callr.   r/   rowsir8   numdonedumpr    r9   r3   	exceptionrT   rU   s$                                     @@r
   rE   rE   j   sn   CE63%))+A..5FE::diik"D s5z*+ ,//4gT$ @HKD eL))M9FF$$S'2G18 5!-tT477??4(D379J9J49PQDD4'.';';E'B$guf3;6%**"3"3D"9::Dz!//guf JL L 	 	" v. %dD2 3uA H#c!f+6Q?@8K	>36

8L8LT8RSDKK H4 OP " ;>uzz?S?STX?YZDKK 6d CDQ d"& 	:D%t|XDJI%11*U2fTlBDg%!$<D 6$**S/"*=#>>DdEJJOOE4JKLD#889	: 	*U4		$3H-IIJ 		$  	!g5!n !'uzz'8'8U'D E %

 1 1#f+ >@ AIF J8s?H

 56FD%HIJ
 "''&/!BGGI$66 	: jj
''),,UFC@
AC
:C 
C 
Cr	   c           	      <   ! 	 | \  }}}t        |t              r|j                  }dt        j                  j                         d   z   dz   t        j                  z   }t        j                  t        j                               }t        |      d|d|ddz   }g }t        j                  ||      }	|	D ]  \  }
 }}}} xr t        j                  j                         xs d t        j                  |
      \  }}}}d}|dk7  r(d|z   }|d	k7  r|t        j                   ||||d
       z  }i !|gf !fd	}t#        ||
|      }d d|g}|8||z
  }|D ].  }d|z  }|j%                  ||j'                         z          |dz  }0 i g }}|D ]  \  }}}||v rd||<   |t(        ur[|dk(  rd|z   }n|dk7  r||j                  d      d   z   }|j%                  |dt*        j,                  j/                  |             t|j%                  |dz           |j%                  dj1                  |             |j%                  ddj1                  |      z          t        |      dt        |      g}t3        |      D ]D  }t*        j,                  j/                  t5        ||            }|j%                  dd|d|       F |dj1                  |      z   dj1                  |      z   ddj1                  t7        j8                  |||            z  z   S )Nr<   r   r=   r[   z
A problem occurred in a Python script.  Here is the sequence of
function calls leading up to the error, in the order they occurred.
r>   r   r?   r@   c                 F    dt         j                  j                  |       z   S rB   )rD   r   rF   rG   s    r
   rH   ztext.<locals>.<lambda>   rI   r	   rJ   c                     d| d   <   t        j                  | d         | dxx   dz  cc<   S # | dxx   dz  cc<   w xY wrM   rO   rR   s    r
   r.   ztext.<locals>.reader   rV   rW   rX   z%5d rN   r   zglobal r   r&   rZ   z = z
 undefinedz
%s
z    zc

The above is a description of an error in a Python program.  Here is
the original traceback:

%s
)r   r]   r^   r_   r`   ra   rb   rc   rd   rf   rg   rh   ri   rj   rk   rl   rm   r:   r-   rstripr   rD   r   rF   rp   rq   r   rr   rs   )"rt   ru   rv   rw   rx   ry   rz   r{   r}   r~   r!   rS   r   r   r   r   r   r   r"   r   r.   r/   r   r   r8   r   r   r   r    r9   r3   r   rT   rU   s"                                   @@r
   r   r      s   DE63%))+A..5FE::diik"D Z5 9 D
 F$$S'2G18 %2-tT4--4'.';';E'B$guf3;4<Dz!//guf JL L 	 	" v. $'(uA qjC-.Q
 d"& 	1D%t|XDJI%H$Y-=dg%edjjob6I.Ituzzu/EFGD</0	1 	DIIdO$h401K%2N !ZV56IF ?

 56%u=>? "''&/!BGGI$66 : 	ggi((<=:> > >r	   c                   (    e Zd Z	 	 	 ddZd ZddZy)HookNc                 n    || _         || _        || _        |xs t        j                  | _        || _        y N)displaylogdirru   r_   stdoutrT   format)selfr   r   ru   rT   r   s         r
   __init__zHook.__init__  s.    &CJJ	r	   c                 ,    | j                  |||f       y r   )handle)r   rv   rw   rx   s       r
   __call__zHook.__call__  s    UFC()r	   c                 j   |xs t        j                         }| j                  dk(  r#| j                  j	                  t                      | j                  dk(  xr t        xs t        }d}	  ||| j                        }| j                  rb|rAt        j                  j                  |      }| j                  j	                  d|z   dz          n:| j                  j	                  |dz          n| j                  j	                  d       | j                  d	d
g| j                  dk(     }t!        j"                  || j                        \  }}	 t%        j&                  |d      5 }|j	                  |       d d d        d|z  }	| j                  dk(  r| j                  j	                  d|	z         n| j                  j	                  |	dz          	 | j                  j)                          y #  dj                  t        j                  |       }d}Y xY w# 1 sw Y   xY w#  d|z  }	Y xY w#  Y y xY w)NrE   Fr   Tz<pre>z</pre>
r[   z*<p>A problem occurred in a Python script.
z.txtz.html)suffixrq   wz*%s contains the description of this error.z*Tried to save traceback to %s, but failed.z
<p>%s</p>
)r_   exc_infor   rT   writer   rE   r   ru   rp   rr   rs   r   rD   r   r   tempfilemkstempri   fdopenflush)
r   info	formatterplaindocr   fdrj   rT   msgs
             r
   r   zHook.handle  s   %s||~;;& IIOOEG$[[&(2d:d		D$,,/C
 <<jj'',		#
 :;		d
+IIOOIJ;;"g&t{{F':;F!))T[[IJRJYYr3' $4JJsO$BTI {{f$		 34		d
+	IIOO;	'')44d;<CE $ $JBTI 	s<   -G+ H" $H6H" H. +%HHH" "H+.H2)rN   NrY   NrE   r   )r^   
__module____qualname__r   r   r   r   r	   r
   r   r     s    I?C*'r	   r   c                 6    	 t        | |||      t        _        y )Nr   r   ru   r   )r   r_   
excepthookr   s       r
   enabler   E  s    0
 '&")&:CNr	   )rY   )rN   NrY   rE   )rg   r+   rP   ri   rD   r_   r   rc   r'   rr   warningsrE   r   re   _deprecatedr^   r   r   r   r   r   r$   r:   r   r   r   handlerr   r   r	   r
   <module>r      s   .    	  
      &   Xg .H 	 *_CB@>D5 5n &--:r	   