Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325
 lŽŒY÷.ã@s%dZddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z dd„Z gZ dd„Z dd„Zd d „Zd d „Zd d„Zddd„Zddd„ZGdd„dƒZeƒjZdddddd„ZdS)ašMore comprehensive traceback formatting for Python scripts. To enable this module, do: import cgitb; cgitb.enable() at the top of your script. The optional arguments to enable() are: display - if true, tracebacks are displayed in the web browser logdir - if set, tracebacks are written to files in this directory context - number of lines of source code to show for each stack frame format - 'text' or 'html' controls the output format By default, tracebacks are displayed but not saved, the context is 5 lines and the output format is 'html' (for backwards compatibility with the original use of this module) Alternatively, if you have caught an exception and want cgitb to display it for you, call cgitb.handler(). The optional argument to handler() is a 3-item tuple (etype, evalue, etb) just like the value of sys.exc_info(). The default handler displays output as HTML. éNcCsdS)zAReturn a string that resets the CGI and browser to a known state.a' --> --> ©rrrú$/opt/python35/lib/python3.5/cgitb.pyÚreset#srcCs|rd|dSdSdS)NzzÚr)ÚtextrrrÚsmall.s rcCs|rd|dSdSdS)Nzz rr)rrrrÚstrong4s rcCs|rd|dSdSdS)Nzzrr)rrrrÚgrey:s r cCs·||krd||fS||jkr:d|j|fSd|jkr­|jd}t|ƒtiƒkr‹||kr­d||fSn"t||ƒr­dt||ƒfSdtfS)z9Find the value for a given name in the given environment.ÚlocalÚglobalÚ __builtins__ÚbuiltinN)Ú f_globalsÚtypeÚhasattrÚgetattrÚ __UNDEF__)ÚnameÚframeÚlocalsÚbuiltinsrrrÚlookup@s   rcCs,gdddtf\}}}}}xtj|ƒD]ð\}} } } } |tjkrYP|tjkrï| tjkrï|dkr¾|tk rìt|| tƒ}|j|| ||fƒqt | ||ƒ\} }|j| | |fƒn/| dkr||d7}|}n d\}}| }q4W|S)zEScan one logical line of Python and look up values of variables used.NrÚ.)Nr) rÚtokenizeÚgenerate_tokensÚNEWLINEÚNAMEÚkeywordÚkwlistrÚappendr)ÚreaderrrÚvarsZ lasttokenÚparentÚprefixÚvalueZttypeÚtokenÚstartÚendÚlineÚwhererrrÚscanvarsPs"$%      r*éc" s¹|\}}}t|tƒr'|j}dtjjƒddtj}tjtjƒƒ}dt j j dt t j j t|ƒƒƒdd|d|ƒd }d td d ƒd }g} tj||ƒ} xõ| D]í\} ‰} } }}ˆr+tjjˆƒ‰dˆt j j ˆƒf}n d‰}tj| ƒ\}}}}d}| dkr”dt | ƒtj||||ddd„ƒ}i‰| g‡‡fdd†}t|| |ƒ}dd||fg}|dk r«| |}xµ|D]­}td d tt|ƒƒt|ƒƒd }|ˆkrjd|t j j|ƒf}|jd|ƒn3d|t j j|ƒf}|jdt|ƒƒ|d7}qúWig}}xÎ|D]Æ\}}} ||krÝq¿d||<| tk rt|d-krd!|t |ƒ}n8|d"kr1t |ƒ}n|t |jd#ƒd.ƒ}|jd$|t j j| ƒfƒq¿|j|d%ƒq¿W|jdttd&j|ƒƒƒƒ| jd'd(j|ƒƒqÜWd)t t j j t|ƒƒƒt j j t|ƒƒfg}!xbt|ƒD]T}|dd…d*kr6qt j jt ||ƒƒ} |!jd+||| fƒqW|dj| ƒdj|!ƒd,t j j djt!j"|||ƒƒƒS)/z9Return a nice HTML document describing a given traceback.zPython rz: zz%sz#ffffffz#6622aaz
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.

zz r+z  z%sú?rzin Ú formatvaluecSsdtjj|ƒS)Nú=)ÚpydocÚhtmlÚrepr)r$rrrÚ�szhtml..c s<dˆ|d.readerz+%s%s %sz Nz=>%s%sz&%sz  %s%sz%sr3r r z %s r rz %s = %sz undefinedz, zF %s
Ú z

%s: %sÚ_z
%s%s = %szî )r r éÿÿÿÿ)#Ú isinstancerÚ__name__ÚsysÚversionÚsplitÚ executableÚtimeÚctimer/r0ÚheadingrÚescapeÚstrrÚinspectÚgetinnerframesÚosÚpathÚabspathÚ getargvaluesÚformatargvaluesr*ÚlenZ preformatrr rr1ÚjoinÚdirrÚ tracebackÚformat_exception)"ÚeinfoÚcontextÚetypeÚevalueÚetbÚpyverÚdateÚheadÚindentÚframesÚrecordsrr6ÚfuncÚlinesÚindexÚlinkÚargsÚvarargsÚvarkwrÚcallr r!ÚrowsÚir(ÚnumÚdoneÚdumprr)r$Ú exceptionr)r7r8rr0es| "@      .       && r0c s]|\}}}t|tƒr'|j}dtjjƒddtj}tjtjƒƒ}dt |ƒ||fd}g}t j ||ƒ} x| D]\} ‰} } } }ˆrÊt j jˆƒpÍd‰t j| ƒ\}}}}d}| dkr)d| t j||||d d d „ƒ}i‰| g‡‡fd d †}t|| |ƒ}dˆ|fg}|dk rÁ| |}x9| D]1}d|}|j||jƒƒ|d7}qŒWig}}x¯|D]§\}}}||króqÕd||<|tk rk|dkr"d|}n#|dkrE||jdƒd}|jd|tjj|ƒfƒqÕ|j|dƒqÕW|jdj|ƒƒ|jddj|ƒƒqšWdt |ƒt |ƒfg}xIt|ƒD];}tjjt||ƒƒ}|jdd ||fƒqàW|dj|ƒdj|ƒddjtj|||ƒƒS)!z:Return a plain text document describing a given traceback.zPython rz: z %s %s %s 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,rzin r-cSsdtjj|ƒS)Nr.)r/rr1)r$rrrr2Ôsztext..c s<dˆ|d.readerz %s %sNz%5d r3r zglobal r rz%s = %sz undefinedr9z %s z%s: %sz %s%s = %sú ézc The above is a description of an error in a Python program. Here is the original traceback: %s r;z )r<rr=r>r?r@rArBrCrFrGrHrIrJrKrLrMr*rÚrstriprr/rr1rOrPrrQrR) rSrTrUrVrWrXrYrZr\r]rr6r^r_r`rbrcrdrrer r!rfrgr(rhrirjrr)r$rkr)r7r8rr¿s^ "           &rc@sLeZdZdZddddddd„Zdd „Zdd d „ZdS) ÚHookz?A hook to replace sys.excepthook that shows tracebacks in HTML.r3Nr+r0cCs:||_||_||_|p'tj|_||_dS)N)ÚdisplayÚlogdirrTr>Ústdoutr7Úformat)ÚselfrprqrTr7rsrrrÚ__init__s    z Hook.__init__cCs|j|||fƒdS)N)Úhandle)rtrUrVrWrrrÚ__call__ sz Hook.__call__c Csò|ptjƒ}|jdkr4|jjtƒƒ|jdkrItpLt}d}y|||jƒ}Wn&dj t j |Œƒ}d}YnX|j ró|rÜ|j ddƒj ddƒ}|jjd |d ƒq|jj|d ƒn|jjd ƒ|jdk rÒd dg|jdk}tjd|d|jƒ\}}y7tj|dƒ�}|j|ƒWdQRXd|} Wnd|} YnX|jdkr¾|jjd| ƒn|jj| d ƒy|jjƒWnYnXdS)Nr0FrTú&z&úz r9z*

A problem occurred in a Python script. z.txtz.htmlÚsuffixrPÚwz*%s contains the description of this error.z*Tried to save traceback to %s, but failed.z

%s

)r>Úexc_inforsr7Úwriterr0rrTrOrQrRrpÚreplacerqÚtempfileÚmkstemprIÚfdopenÚflush) rtÚinfoÚ formatterZplainÚdocrzÚfdrJr7Úmsgrrrrvs@  !z Hook.handle)r=Ú __module__Ú __qualname__Ú__doc__rurwrvrrrrros   ror3c Cs(td|d|d|d|ƒt_dS)aInstall an exception handler that formats tracebacks as HTML. The optional argument 'display' can be set to 0 to suppress sending the traceback to the browser, and 'logdir' can be set to a directory to cause tracebacks to be written to files there.rprqrTrsN)ror>Ú excepthook)rprqrTrsrrrÚenable8srŒ)rŠrGrr4rIr/r>rrBrrQrrrrr rr*r0rrorvÚhandlerrŒrrrrÚs,                ZA7