gunicorn worker failed to boot
itxx00 opened this issue · comments
Hello, 在按照文档安装完成之后,启动的时候报错如下:
2014-02-18 03:07:58 [9947] [INFO] Starting gunicorn 18.0
2014-02-18 03:07:58 [9947] [INFO] Listening at: http://127.0.0.1:8000 (9947)
2014-02-18 03:07:58 [9947] [INFO] Using worker: sync
2014-02-18 03:07:58 [9952] [INFO] Booting worker with pid: 9952
2014-02-18 03:07:58 [9953] [INFO] Booting worker with pid: 9953
/opt/code/src/python-libmemcached/cmemcached.py:50: DeprecationWarning: object.__init__() takes no parameters
cmemcached_imp.Client.__init__(self, logger)
/opt/code/src/python-libmemcached/cmemcached.py:50: DeprecationWarning: object.__init__() takes no parameters
cmemcached_imp.Client.__init__(self, logger)
2014-02-18 03:07:58 [9952] [ERROR] Exception in worker process:
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/gunicorn/arbiter.py", line 495, in spawn_worker
worker.init_process()
File "/usr/lib/python2.6/site-packages/gunicorn/workers/base.py", line 106, in init_process
self.wsgi = self.app.wsgi()
File "/usr/lib/python2.6/site-packages/gunicorn/app/base.py", line 114, in wsgi
self.callable = self.load()
File "/usr/lib/python2.6/site-packages/gunicorn/app/wsgiapp.py", line 62, in load
return self.load_wsgiapp()
File "/usr/lib/python2.6/site-packages/gunicorn/app/wsgiapp.py", line 49, in load_wsgiapp
return util.import_app(self.app_uri)
File "/usr/lib/python2.6/site-packages/gunicorn/util.py", line 354, in import_app
__import__(module)
File "/opt/code/app.py", line 5, in <module>
from web import app as web
File "/opt/code/web.py", line 17, in <module>
from code.views.util import is_mobile_device
File "/opt/code/code/views/__init__.py", line 9, in <module>
from code.views.users import UserUI
File "/opt/code/code/views/users/__init__.py", line 6, in <module>
from code.models.project import Project
File "/opt/code/code/models/project.py", line 9, in <module>
from code.models.git.repo import ProjectRepo
File "/opt/code/code/models/git/repo.py", line 329
commits = {c['sha']: c for c in commits}
^
SyntaxError: invalid syntax
我已经尝试解决但是未果,请问大牛此问题该如何破? thanks.
python 版本不对
2014-02-18 11:15 GMT+08:00 xingxing notifications@github.com:
Hello, 在按照文档安装完成之后,启动的时候报错如下:
2014-02-18 03:07:58 [9947] [INFO] Starting gunicorn 18.0
2014-02-18 03:07:58 [9947] [INFO] Listening at: http://127.0.0.1:8000 (9947)
2014-02-18 03:07:58 [9947] [INFO] Using worker: sync
2014-02-18 03:07:58 [9952] [INFO] Booting worker with pid: 9952
2014-02-18 03:07:58 [9953] [INFO] Booting worker with pid: 9953
/opt/code/src/python-libmemcached/cmemcached.py:50: DeprecationWarning: object.init() takes no parameters
cmemcached_imp.Client.init(self, logger)
/opt/code/src/python-libmemcached/cmemcached.py:50: DeprecationWarning: object.init() takes no parameters
cmemcached_imp.Client.init(self, logger)
2014-02-18 03:07:58 [9952] [ERROR] Exception in worker process:
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/gunicorn/arbiter.py", line 495, in spawn_worker
worker.init_process()
File "/usr/lib/python2.6/site-packages/gunicorn/workers/base.py", line 106, in init_process
self.wsgi = self.app.wsgi()
File "/usr/lib/python2.6/site-packages/gunicorn/app/base.py", line 114, in wsgi
self.callable = self.load()
File "/usr/lib/python2.6/site-packages/gunicorn/app/wsgiapp.py", line 62, in load
return self.load_wsgiapp()
File "/usr/lib/python2.6/site-packages/gunicorn/app/wsgiapp.py", line 49, in load_wsgiapp
return util.import_app(self.app_uri)
File "/usr/lib/python2.6/site-packages/gunicorn/util.py", line 354, in import_app
import(module)
File "/opt/code/app.py", line 5, in
from web import app as web
File "/opt/code/web.py", line 17, in
from code.views.util import is_mobile_device
File "/opt/code/code/views/init.py", line 9, in
from code.views.users import UserUI
File "/opt/code/code/views/users/init.py", line 6, in
from code.models.project import Project
File "/opt/code/code/models/project.py", line 9, in
from code.models.git.repo import ProjectRepo
File "/opt/code/code/models/git/repo.py", line 329
commits = {c['sha']: c for c in commits}
^
SyntaxError: invalid syntax我已经尝试解决但是未果,请问大牛此问题该如何破? thanks.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/20
.
是你python版本的问题,建议你使用Python 2.7
感谢各位,但是目前我使用的系统是CentOS6.4 ,python默认只到2.6 如果要升级到2.7的话又会有很多其他软件的依赖问题,我还是换ubuntu吧,不过我建议在安装文档里面写清楚python版本的依赖。thanks.
补充一下,我是指的这个文档最好也把版本要求写上哈,http://douban-code.github.io/pages/getting-started.html
已更新,感谢~