Django Fix Gunicorn Error “ImportError: No module named validation”

Today I’m trying to deploy django app to my VPS. I choose Gunicorn because their simple configuration. But when I run the wsgi server on gunicorn with this command.

$ gunicorn_django --bind mydomainOrvpsIp:8001

I got this error.

[2016-02-11 04:56:38 +0000] [15787] [ERROR] Exception in worker process:
Traceback (most recent call last):
  File "/root/.virtualenvs/portofolio/lib/python2.7/site-packages/gunicorn/", line 515, in spawn_worker
  File "/root/.virtualenvs/portofolio/lib/python2.7/site-packages/gunicorn/workers/", line 122, in init_process
  File "/root/.virtualenvs/portofolio/lib/python2.7/site-packages/gunicorn/workers/", line 130, in load_wsgi
    self.wsgi =
  File "/root/.virtualenvs/portofolio/lib/python2.7/site-packages/gunicorn/app/", line 67, in wsgi
    self.callable = self.load()
  File "/root/.virtualenvs/portofolio/lib/python2.7/site-packages/gunicorn/app/", line 105, in load
    mod = util.import_module("")
  File "/root/.pyenv/versions/2.7.11/lib/python2.7/importlib/", line 37, in import_module
  File "/root/.virtualenvs/portofolio/lib/python2.7/site-packages/gunicorn/app/", line 21, in <module>
    from import get_validation_errors
ImportError: No module named validation

To fix this, we need to use latest command to run our app in gunicorn, because previous command already deprecated.

$ gunicorn --bind mydomainOrvpsIp:8001 myproject.wsgi:application


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.