我对独角兽非常缺乏经验。我将它安装在虚拟环境中,并尝试使用以下内容为金字塔应用程序提供服务:
env/bin/gunicorn --pid /home/staging/gunicorn.pid --bind 0.0.0.0:8000 pyzendoc:main
但是,每次发送请求时,我都会从 gunicorn 获得以下跟踪
2013-10-30 14:16:20 [1284] [ERROR] Error handling request
Traceback (most recent call last):
File "/home/staging/api/env/local/lib/python2.7/site-packages/gunicorn/workers/sync.py", line 126, in handle_request
respiter = self.wsgi(environ, resp.start_response)
TypeError: main() takes exactly 1 argument (2 given)
我猜 gunicorn 中的 main 是指金字塔init中的 main 方法,但该方法将 (global_config, **settings) 作为参数,所以我认为可能 gunicorn 以某种方式查看了错误的方法。有没有人见过类似的东西?
谢谢
C