<div dir="ltr"><br>My first suggestion is debug with ipython.  I think you can insert breakpoints like: import ipdb; ipdb,set_trace(); after you pip install ipdb. That will make the whole world pretty and colorful.<div><br>
</div><div>Second, I have there are so many ways to print a stack in Python @@ I once complained about this along with handing of dates/times in Python. I stopped complaining once I realized there are reasons things are complicated--complicated, is not the right word. The reality stack traces, like date/times, are pretty complex.  So my second tip is to explore some tools. For example try:  <span style="background-color:rgb(241,241,241);color:rgb(68,68,68);font-family:Monaco,'DejaVu Sans Mono','Bitstream Vera Sans Mono',monospace;font-size:12px"> </span><span class="" style="font-family:Monaco,'DejaVu Sans Mono','Bitstream Vera Sans Mono',monospace;font-size:12px;margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;color:rgb(0,0,0)">cgitb</span><span class="" style="font-family:Monaco,'DejaVu Sans Mono','Bitstream Vera Sans Mono',monospace;font-size:12px;margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;color:rgb(206,92,0);font-weight:bold">.</span><span class="" style="font-family:Monaco,'DejaVu Sans Mono','Bitstream Vera Sans Mono',monospace;font-size:12px;margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;color:rgb(0,0,0)">text</span><span class="" style="font-family:Monaco,'DejaVu Sans Mono','Bitstream Vera Sans Mono',monospace;font-size:12px;margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,0);font-weight:bold">(</span><span class="" style="font-family:Monaco,'DejaVu Sans Mono','Bitstream Vera Sans Mono',monospace;font-size:12px;margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;color:rgb(0,0,0)">sys</span><span class="" style="font-family:Monaco,'DejaVu Sans Mono','Bitstream Vera Sans Mono',monospace;font-size:12px;margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;color:rgb(206,92,0);font-weight:bold">.</span><span class="" style="font-family:Monaco,'DejaVu Sans Mono','Bitstream Vera Sans Mono',monospace;font-size:12px;margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;color:rgb(0,0,0)">exc_info</span><span class="" style="font-family:Monaco,'DejaVu Sans Mono','Bitstream Vera Sans Mono',monospace;font-size:12px;margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,0);font-weight:bold">())</span><div>
<br></div><div>There is also a method cgitb.html(). </div><div><br></div><div>hth, BR</div><div><br></div><div><br><div><div><br></div><div><br></div></div></div></div></div>