【发布时间】:2023-10-22 07:32:01
【问题描述】:
My python version is 2.7.2
python 由 uwsgi 运行 我的 nginx 配置是
location /{
uwsgi_pass 127.0.0.1:8888;
include uwsgi_params;
}
app.py
import tornado.ioloop
import tornado.web
class MainHandler(tornado.web.RequestHandler):
def get(self):
self.write("Hello, world")
if __name__ == "__main__":
application = tornado.web.Application([
(r"/", MainHandler),
])
application.listen(9090)
tornado.ioloop.IOLoop.instance().start()
然后我运行“我运行”uwsgi -s :9090 -w app”
但是会报错
[pid: 28719|app: 0|req: 21/21] 118.207.180.64 () {38 vars in 716 bytes} [Sun Mar 23 22:44:34 2014] GET / => 在 0 中生成了 0 个字节毫秒 (HTTP/1.1 500) 0 个字节中的 0 个标头(核心 0 上的 0 个开关) AttributeError: application instance has no call method
如何解决?
【问题讨论】:
-
您可以链接或粘贴您的 uwsgi 配置 (/etc/uwsgi/your-app.ini) 吗?
标签: python nginx centos tornado uwsgi