【发布时间】:2020-10-13 19:29:43
【问题描述】:
我最近从 python 2.7 升级到运行 Python Flask 1.1.1 并使用 gunicorn 的 python 3.7。一切似乎都按预期运行,但每次我在应用程序中加载页面时,都会收到类似于以下错误的 wsgi 错误;
{'wsgi.errors': <gunicorn.http.wsgi.WSGIErrorsWrapper object at [Object]>, 'wsgi.version': (1, 0), 'wsgi.multithread': False, 'wsgi.multiprocess': False, 'wsgi.run_once': False, 'wsgi.file_wrapper': <class 'gunicorn.http.wsgi.FileWrapper'>, 'wsgi.input_terminated': True, 'SERVER_SOFTWARE': 'gunicorn/20.0.4', 'wsgi.input': <gunicorn.http.body.Body object at [Object]>, 'gunicorn.socket': <socket.socket fd=11, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 8000), raddr=('127.0.0.1', 46186)>, 'REQUEST_METHOD': 'GET', 'QUERY_STRING': '', 'RAW_URI': ..... <bound method Response.start_response of <gunicorn.http.wsgi.Response object at [Object]>>
正如我提到的,每次访问任何应用程序页面时都会产生类似的错误。 wsgi.error 对象中嵌入的实际错误消息根据页面上调用的查询等略有不同。这些错误似乎并不严重,但它填满了我的日志。谁能告诉我为什么在我的网络服务器上收到这些错误作为输出,是否有办法修复它?
【问题讨论】:
标签: python flask gunicorn wsgi