1

これはドキュメントからのものです......

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'
4

2 に答える 2

6

0.11 より前のバージョンでは、次のようにしてデバッグ モードを有効にできます。

bottle.debug(True)
bottle.run(host='localhost', port=8049)
于 2012-09-30T10:57:45.250 に答える
5

実行するパラメーターは、ボトル バージョン 0.11以降debug=でのみ使用できます。ボトルを更新する (たとえば、最新バージョンをダウンロードしてアプリケーションのディレクトリに配置するなど) か、置き換えて削除します。debug=True

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

run(host='localhost', port=8049)
于 2012-09-30T10:40:49.040 に答える