/usr/local/lib/python3.6/site-packages/werkzeug/debug/__pycache__
NameSizeModeActions
console.cpython-36.pyc78090644editdlrm
repr.cpython-36.pyc87770644editdlrm
tbtools.cpython-36.pyc179760644editdlrm
__init__.cpython-36.pyc128670644editdlrm
Edit: /usr/local/lib/python3.6/site-packages/werkzeug/debug/__pycache__/tbtools.cpython-36.pyc (17976B)
3 _TBgK@sXddlZddlZddlZddlZddlZddlZddlZddlZddl m Z ddl m Z ddl mZddl mZddlmZddlmZdd lmZd d lmZejd Zejd ejZejdZdZdZededZedeZ dZ!dZ"dZ#d'e$e%e$dddZ&d(e%e%e'ddddZ(Gd d!d!Z)Gd"ddZ*Gd#d$d$Z+Gd%d&d&Z,dS))N)escape) TokenError)CodeType) TracebackType)_to_str)get_filesystem_encoding)cached_property)Consolescoding[:=]\s*([-\w.]+)s^(.*?)$z+^(\s*def\s)|(.*(? %(title)s // Werkzeug Debugger
a

Console Locked

The console is locked and needs to be unlocked by entering the PIN. You can find the PIN printed out on the standard output of your shell that runs the server.

PIN:

a

%(exception_type)s

%(exception)s

Traceback (most recent call last)

%(summary)s

This is the Copy/Paste friendly version of the traceback.

The debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error. If you enable JavaScript you can also use additional features such as code execution (if the evalex feature is enabled), automatic pasting of the exceptions and much more.
z a+

Interactive Console

In this console you can execute Python expressions in the context of the application. The initial namespace was created by the debugger automatically.
The Console requires JavaScript.
zU
%(title)s %(description)s
a

File "%(filename)s", line %(lineno)s, in %(function_name)s

%(lines)s
zV %(lineno)s %(code)s T)secretevalex_trustedreturncCstd|r dnddd|ddS)Ntruefalser r )evalexr consoletitler traceback_id) CONSOLE_HTML)r r r:/tmp/pip-build-0s3hx122/Werkzeug/werkzeug/debug/tbtools.pyrender_console_htmls rF Traceback)ignore_system_exceptionsshow_hidden_framesskiprcCstjtjtjtttftj}|\}}}|r@|tt t hkr@x"t |D]}|j dkrZP|j }qJWt |||}|s||j|S)a Get the current exception info as `Traceback` object. Per default calling this method will reraise system exceptions such as generator exit, system exit or others. This behavior can be disabled by passing `False` to the function as first parameter. N)tcastTupleType BaseExceptionrsysexc_info SystemExitKeyboardInterrupt GeneratorExitrangetb_nextrfilter_hidden_frames)rrrinfoexc_type exc_valuetb_rrrget_current_tracebacks     r0c@sLeZdZdZdZeedddd Zee j ed d d Z ed d dZ dS)LinezHelper for the source renderer.linenocodein_framecurrentN)r2r3rcCs||_||_d|_d|_dS)NF)r2r3r4r5)selfr2r3rrr__init__sz Line.__init__)rcCs*dg}|jr|jd|jr&|jd|S)Nlinezin-framer5)r4appendr5)r6rvrrrclassess   z Line.classescCs tdj|j|jt|jdS)N )r;r2r3)SOURCE_LINE_HTMLjoinr;r2rr3)r6rrrrenders z Line.render)r2r3r4r5) __name__ __module__ __qualname____doc__ __slots__intstrr7propertyrListr;r?rrrrr1s r1c@seZdZdZejeeeddddZddddZ e e dd d Z e e dd d Zdejeje dd ddZde e dddZde eje e e dddZee dddZe edddZdS)rzWraps a traceback.N)r,r-r.rcCs||_||_||_|j}|jdkr2|jd|}||_g|_t}xV|jjt ||||j t ||j pr|j }|dkst ||krPt|}|j}qFW|jjdd|jD|_dS)Nbuiltins __builtin__ exceptions.cSsg|]}|jD]}|qqSr)frames).0groupframerrr sz&Traceback.__init__..>rIrJrK)r,r-r.r@rAexception_typegroupssetr9Groupaddid __cause__ __context__type __traceback__reverserM)r6r,r-r.rRmemorrrr7s&    zTraceback.__init__)rcCs6x|jD] }|jqWdd|jD|jdd<dS)z.Remove the frames according to the paste spec.cSsg|]}|jD]}|qqSr)rM)rNrOrPrrrrQsz2Traceback.filter_hidden_frames..N)rSr*rM)r6rOrrrr*s  zTraceback.filter_hidden_framescCs t|jtS)zIs it a syntax error?) isinstancer- SyntaxError)r6rrris_syntax_errorszTraceback.is_syntax_errorcCs |jdjS)z-String representation of the final exception.r r)rS exception)r6rrrraszTraceback.exception)logfilercCs,|dkrtj}|jjd}|j|dS)z+Log the ASCII traceback into a file object.N )r#stderr plaintextrstripwrite)r6rbr.rrrlogsz Traceback.logT) include_titlercsd}dg}|js |jdg}nFtdd|jD}d|koLt|jknfdd|jD}|rz|jrvd }nd }|jrd t|jd }nd t|jd}tdj |d|r|ndddj ||dS)z1Render the traceback for the interactive console. tracebackznoframe-tracebackcss|] }|jVqdS)N) is_library)rNrPrrr sz+Traceback.render_summary..rcsg|]}|jdqS))mark_lib)r?)rNrO)rnrrrQsz,Traceback.render_summary..z Syntax Errorz+Traceback (most recent call last):z
z
z
z
r<z

z

rc)r;rrM description) rMr9sumlenrSr`rra SUMMARY_HTMLr>)r6rirr;rMZlibrary_framesror)rnrrender_summary s( zTraceback.render_summaryF)rr r rc Cs\t|j}t|rdnd|rdndd||t|j|jddt|jtjdd|j|j|d S)z2Render the Full HTML page with the traceback info.rrF)riz-{2,}-) rr rrrarRsummaryreZ plaintext_csrr ) rra PAGE_HTMLrRrsreresubrW)r6rr r excrrr render_full+s    zTraceback.render_fullcCsdjdd|jDS)NrccSsg|] }|jqSr) render_text)rNrOrrrrQCsz'Traceback.plaintext..)r>rS)r6rrrreAszTraceback.plaintextcCst|S)N)rW)r6rrrrWEsz Traceback.id)N)T)FNT)r@rArBrCrr!r"rr7r*rGboolr`rFraOptionalZIOrhrsrzr rerErWrrrrrs( c@sjeZdZdZejeeeddddZddddZ e e dd d Z de e d d dZe dddZdS)rUzA group of frames for an exception in a traceback. If the exception has a ``__cause__`` or ``__context__``, there are multiple exception groups. N)r,r-r.rcCsf||_||_d|_|jdk r$d|_n|jdk r4d|_g|_x&|dk r`|jjt||||j}qstripr)r6bufr:rrrraszGroup.exceptionT)rnrcCsvg}|jdk r"|jd|jdxH|jD]>}|jrFdt|jdnd}|jd|d|j|dq*Wd j|S) Nz
  • z:
    z title=""rjz)rnrc)r+r9rMrr?r>)r6rnoutrPrrrrr?s  "z Group.rendercCs`g}|jdk r"|jd|jd|jdx|jD]}|j|jq4W|j|jdj|S)Nrcz: z"Traceback (most recent call last):)r+r9rMr{rar>)r6rrPrrrr{s    zGroup.render_text)T)r@rArBrCrr!r"rr7r*rGrFrar|r?r{rrrrrUJs% rUc@seZdZdZejeeeddddZd#e e ddd Z e e d d d Z e d d dZe d ddZejed ddZd$eje efe ejdddZe eje d ddZd%eejeje e eje fdddZee d ddZe ed dd Zeed d!d"ZdS)&r~zA single frame in a traceback.N)r,r-r.rcCs|j|_|jjj|_|jj|_|jj|_ t j |p:t j |}|d dd krX|dd}t jj|rpt jj|}t|t|_|j jd|jjd|_|j jd|jjd|_|jj|_|jjdd|_|jjd }|dk rt|d d }||_dS)N.pyo.pycr r@ __loader__Z__traceback_hide__FZ__traceback_info__zutf-8r)rrr) tb_linenor2tb_framef_codeco_name function_namef_localslocals f_globalsglobalsinspectZ getsourcefileZgetfileospathisfilerealpathrrfilenamegetrloaderr3rr+)r6r,r-r.fnr+rrrr7s$         zFrame.__init__T)rnrcCs8t|jt|j|jt|j|j|r.|jr.dnddS)z%Render a single frame in a traceback.libraryrj)rWrr2rlinesr) FRAME_HTMLrWrrr2rrender_line_contextrl)r6rnrrrr?sz Frame.render)rcstfddtjjDS)Nc3s"|]}jjtjj|VqdS)N)r startswithrrr)rNr)r6rrrmsz#Frame.is_library..)any sysconfig get_pathsvalues)r6r)r6rrls zFrame.is_librarycCs(d|jd|jd|jd|jjS)Nz File "z", line z, in z )rr2r current_liner)r6rrrr{szFrame.render_textcsl|j\}}}gttddfdd }x|D]}||dq.W||dx|D]}||dqPWdjS)N)r8clsrcsV|jj}|j}t|t|}jd|dd|d|rFt|ndddS)Nz
    r<zz
    ) expandtabsrfrrqr9r)r8rZ stripped_lineprefix)r:rr render_lines  z.Frame.render_line_context..render_linerr5rrc)get_context_linesrFr>)r6rr5rrr8r)r:rrs   zFrame.render_line_contextcCsddt|jD}t|jdr|jjd}x&|dkrRtj||jrHP|d8}q.Wy$ttj dd||dD}Wnt k rd}YnXx||||D] }d|_ qWyd||j d_ Wntk rYnX|S) z:Helper function that returns lines with extra information.cSsg|]\}}t|d|qS)r )r1)rNidxxrrrrQsz-Frame.get_annotated_lines..co_firstlinenor rcSsg|]}|jdqS)rc)r3)rNrrrrrQsNT) enumerate sourcelineshasattrr3r _funcdef_rematchrqrZgetblockrr4r2r5 IndexError)r6rr2offsetr8rrrget_annotated_liness$    $  zFrame.get_annotated_linessingle)r3modercCs&t|trt|d|}t||j|jS)z*Evaluate code in the context of the frame.z )r^rFcompileevalrr)r6r3rrrrrs  z Frame.evalc Csdd}|jdk r^y:t|jdr,|jj|j}nt|jdrF|jj|j}Wntk r\YnX|dkry&t|jdd}|j }WdQRXWnt k rgSXt |t r|j Sd}|jtjr|dd}nPxNttj|D]<\}}tj|j}|dk r|jdjd}P|dkrPqWt|}ytj|Wntk rRd}YnX|j|d j S) z.The sourcecode of the file as list of strings.N get_sourceget_source_by_coderb)rzutf-8r r)rrrrrr3 ExceptionopenrreadOSErrorr^rF splitlinesrcodecsBOM_UTF8r_line_refinditer _coding_researchrOdecoderlookup LookupError)r6sourcefcharsetrrZ coding_matchrrrrsB       zFrame.sourcelines)contextrcCs@|j|j|d|jd}|j|j|j|}||j|fS)Nr )rr2r)r6rrZpastrrrrDszFrame.get_context_linesc Cs*y|j|jdStk r$dSXdS)Nr rj)rr2r)r6rrrrKszFrame.current_linecCst|j|jS)N)r rr)r6rrrrRsz Frame.consolecCst|S)N)rW)r6rrrrWVszFrame.id)T)r)r) r@rArBrCrr!r"rr7r|rFr?r rlr{rrHr1rUnionrZAnyrrrEr rrGrr rrWrrrrr~s,  0&r~)T)FFr)-rrrrwr#rrkZtypingrhtmlrtokenizertypesrrZ _internalr filesystemrutilsr rr rr MULTILINErrZHEADERZFOOTERrvrrrrr=rFr|rrEr0r1rrUr~rrrrsF              t]