Degguging bottle does not work
Question
I cannot debug bottle. I have 500 errors in dev. I am using the latest bottle wit the debug=True
flag.
if __name__ == "__main__":
# Interactive mode
run(host='localhost', port=8049,debug=True)
This is what I get.....
Bottle v0.11.rc1 server starting up (using WSGIRefServer())...
Listening on http://localhost:8049/
Hit Ctrl-C to quit.
localhost - - [30/Sep/2012 18:59:13] "POST /bidder/ HTTP/1.1" 500 1407
localhost - - [30/Sep/2012 18:59:14] "POST /bidder/ HTTP/1.1" 500 1407
localhost - - [30/Sep/2012 18:59:14] "POST /bidder/ HTTP/1.1" 500 1407
localhost - - [30/Sep/2012 18:59:15] "POST /bidder/ HTTP/1.1" 500 1407
localhost - - [30/Sep/2012 18:59:15] "POST /bidder/ HTTP/1.1" 500 1407
I don't mind the 500 as long I can find out why?
Solution
The debug=False
keyword parameter in the run()
function is only available in the current development version; the current 0.10.x code itself ignores doesn't yet support it.
Instead, use the debug()
function instead:
if __name__ == "__main__":
# Interactive mode
run(host='localhost', port=8049)
debug(True)
or run with the --debug
command-line flag.
You may have to import the debug
function from bottle
if you haven't done so already. The tutorial explains debug mode in more detail.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow