我无法调试瓶子。我在开发中有500个错误。我正在使用debug=True
标志的最新瓶子。
if __name__ == "__main__":
# Interactive mode
run(host='localhost', port=8049,debug=True)
这就是我得到的.....
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
我不介意500,只要我能找到原因?
答案 0 :(得分:1)
debug=False
函数中的run()
关键字参数仅在当前开发版本中可用;当前的0.10.x代码本身忽略还不支持它。
相反,请改用debug()
function:
if __name__ == "__main__":
# Interactive mode
run(host='localhost', port=8049)
debug(True)
或使用--debug
命令行标志运行。
如果您还没有这样做,则可能必须从debug
导入bottle
功能。该教程解释了debug mode in more detail。