后 pip安装烧瓶 pip install pynba
我尝试使用代码
import flask import pynba.wsgi class FlaskWithPynba(flask.Flask): @pynba.wsgi.monitor(('localhost', 30002)) def wsgi_app(self, environ, start_response): super(FlaskWithPynba, self).wsgi_app(environ, start_response) app = FlaskWithPynba('myapp')
但在调用app.run()
时会出现一些错误Traceback (most recent call last): File "/home/coffee/venv/local/lib/python2.7/site-packages/flask/app.py", line 1836, in __call__ return self.wsgi_app(environ, start_response) File "pynba/wsgi/middleware.pyx", line 63, in pynba.wsgi.middleware.PynbaMiddleware.__call__ (pynba/wsgi/middleware.c:1554) File "pynba/wsgi/middleware.pyx", line 64, in pynba.wsgi.middleware.PynbaMiddleware.__call__ (pynba/wsgi/middleware.c:1510) TypeError: wsgi_app() takes exactly 3 arguments (2 given)