P
P
PiggyPig2017-10-10 10:00:46
Django
PiggyPig, 2017-10-10 10:00:46

How to fix uwsgi.ini error in Django project?

Good afternoon!
Actually, when starting the uwsgi.ini file, I encountered the following error:

Traceback (most recent call last):
  File "./project/wsgi.py", line 12, in <module>
    from django.core.wsgi import get_wsgi_application
ImportError: No module named 'django'
unable to load app 0 (mountpoint='') (callable not found or import error)
*** no app loaded. going in full dynamic mode ***

The uwsgi.ini file itself
[uwsgi]
chdir = /home/django/project
module = project.wsgi
master = true
processes = 10
socket = /home/django/project/deployment/project_nginx.sock
chmod-socket = 666
vacuum = True

Most likely the problem is the lack of virtualenv. But if this is the reason, is it possible to do without it? There is only one project, so I don’t see any point in putting it [environment].

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2017-10-10
@kentuck1213

I understand emperor mode:
I have this:

[uwsgi]
project = my_project_name
base = /home/my_name
chdir = %(base)/%(project)
home = %(base)/Env/%(project)
module = %(project).wsgi:application
master = true
processes = 5
socket = %(base)/%(project)/%(project).sock
chmod-socket = 664
vacuum = true

It seems that you did not specify the home variable .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question