这是来自文档……

if __name__ == "__main__":
    # Interactive mode
    run(host='localhost', port=8049, debug=True)


这是我得到的错误。我错过了什么?

Bottle server starting up (using WSGIRefServer(debug=True))...
Listening on http://localhost:8049/
Hit Ctrl-C to quit.
Shutdown...
Traceback (most recent call last):
  File "/home/ubuntu/workspace/rtbopsConfig/rtbServers/rtbUwsgiBidderServer/uwsgiBidderServer.py", line 1239, in <module>
    run(host='localhost', port=8049, debug=True)
  File "/usr/local/lib/python2.7/dist-packages/bottle-0.10.11-py2.7.egg/bottle.py", line 2426, in run
    server.run(app)
  File "/usr/local/lib/python2.7/dist-packages/bottle-0.10.11-py2.7.egg/bottle.py", line 2123, in run
    srv = make_server(self.host, self.port, handler, **self.options)
TypeError: make_server() got an unexpected keyword argument 'debug'

最佳答案

要运行的debug=参数仅在since瓶版本0.11中可用。更新瓶子(例如仅通过downloading the up-to-date version并将其放置在应用程序的目录中),或通过替换来删除debug=True

run(host='localhost', port=8049, debug=True)




run(host='localhost', port=8049)

关于python - Python,瓶子,现在可以调试,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/12660568/

10-11 01:01