import cgitb; cgitb.enable()
<type 'exceptions.TypeError'> | Python 2.7.18: /usr/bin/python Wed Apr 24 13:18:40 2024 |
A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
/home/jdearte/1001010.com/pytest/crash_example_04.py in <module>() |
24 |
25 if( __name__ == "__main__"): |
=> 26 main() |
27 print "more unreachable text" |
28 print "</body></html>" |
main = <function main> |
/home/jdearte/1001010.com/pytest/crash_example_04.py in main() |
18 print "<li><code>import cgitb; cgitb.enable()</code></li>" |
19 print "<li>Nothing will print after this line, the next line contains a div/0!</li>" |
=> 20 print "<li>This will crash: 1/0=%d </li>" % 1/0 |
21 print "</ul>" |
22 print "unreachable text" |
<type 'exceptions.TypeError'>: unsupported operand type(s) for /: 'str' and 'int'
args =
("unsupported operand type(s) for /: 'str' and 'int'",)
message =
"unsupported operand type(s) for /: 'str' and 'int'"