Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Python by (280 points)

I was following these step in the guide 

Before getting into nginx, I just want to make sure whether uWSGI works correctly

srv/www/domain/projectdatabank/ this is my folder structure and the project databank folder contains my manage.py file

This is how my wsgi.py file looks like:

import os

import sys

from django.core.wsgi import get_wsgi_application

application = get_wsgi_application()

Do you want to check my setting.py?

When I try to point myself to the browser, I'm getting the following error

-- no python application found, check your startup logs for errors ---

[pid: 10165|app: -1|req: -1/1] 66.56.35.151 () {38 vars in 681 bytes} [Tue Jul  9 18:19:46 2013] GET /admin/ => generated 21 bytes in 0 msecs (HTTP/1.1 500) 1 headers in 57 bytes (0 switches on core 0)

--- no python application found, check your startup logs for errors ---

[pid: 10165|app: -1|req: -1/2] 66.56.35.151 () {36 vars in 638 bytes} [Tue Jul  9 18:19:49 2013] GET / => generated 21 bytes in 0 msecs (HTTP/1.1 500) 1 headers in 57 bytes (0 switches on core 0)

When I checked my uWGI log, it shows same as the above.

1 Answer

0 votes
by (26.4k points)
edited by

You can solve this

To run uWSGI don't include full path to the wsgi.py file in your original command line

uwsgi --http :8000 --chdir /srv/www/databankinfo.com/projectdatabank/ --wsgi-file wsgi.py 

to this

uwsgi --http :8000 --chdir /srv/www/databankinfo.com/projectdatabank/ --wsgi-file full/path/wsgi.py

and this works.

For more information about Python, click on this link

Want to become a Python expert? Come and join: Python Online course

Browse Categories

...