Posts

Showing posts with the label wsgi

Fix "ImportError: cannot import name deploy" when running keystone

When trying to access keystone's address, for example http://localhost:5000/v3, I got this apache2's error: 2018-03-09 01:51:42.468036 mod_wsgi (pid=21691): Target WSGI script '/usr/bin/keystone-wsgi-public' cannot be loaded as Python module. 2018-03-09 01:51:42.468106 mod_wsgi (pid=21691): Exception occurred processing WSGI script '/usr/bin/keystone-wsgi-public'. 2018-03-09 01:51:42.468137 Traceback (most recent call last): 2018-03-09 01:51:42.468164   File "/usr/bin/keystone-wsgi-public", line 6, in <module> 2018-03-09 01:51:42.468248     from keystone.server.wsgi import initialize_public_application 2018-03-09 01:51:42.468262   File "/usr/lib/python2.7/dist-packages/keystone/server/wsgi.py", line 30, in <module> 2018-03-09 01:51:42.468336     from keystone.version import service as keystone_service 2018-03-09 01:51:42.468349   File "/usr/lib/python2.7/dist-packages/keystone/version/service.py", line 19, ...

Gunicorn error when running with Django1.7

If you running your django1.7 apps with Gunicorn, you will get this error: Traceback (most recent call last):   File "/home/.venv/ptc/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 507, in spawn_worker     worker.init_process()   File "/home/.venv/ptc/local/lib/python2.7/site-packages/gunicorn/workers/base.py", line 114, in init_process     self.wsgi = self.app.wsgi()   File "/home/.venv/ptc/local/lib/python2.7/site-packages/gunicorn/app/base.py", line 66, in wsgi     self.callable = self.load()   File "/home/.venv/ptc/local/lib/python2.7/site-packages/gunicorn/app/djangoapp.py", line 105, in load     mod = util.import_module("gunicorn.app.django_wsgi")   File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module     __import__(name)   File "/home/.venv/ptc/local/lib/python2.7/site-packages/gunicorn/app/django_wsgi.py", line 20, in <module>     from...