[Fixed]-Uwsgi: unrecognized option '–module=MyProject.wsgi:application'

15👍

I ran into this recently when I tried to use the version of uWSGI in the Unbuntu 12.04 repo (1.0.3). It looks likes that version is a bit old. Just use pip to grab it (1.2.5).

pip install uwsgi

41👍

You probably need to add the --plugins option to your command line to use the system installed uwsgi. On Fedora 17, at least, this is neccesary for me:

$ uwsgi --http 127.0.0.1:8000 --module=wsgiref.simple_server:demo_app
uwsgi: unrecognized option '--module=wsgiref.simple_server:demo_app'
getopt_long() error
$

but this works:

$ uwsgi --http 127.0.0.1:8000 --plugins python --module=wsgiref.simple_server:demo_app
*** Starting uWSGI 1.2.4 (64bit) on [Thu Aug 30 14:09:57 2012] ***
[.. snip]

0👍

Try this

uwsgi --socket /run/uwsgi/mysite.sock --chdir /home/ubuntu/mysite/ --plugin The_OJ.wsgi --chmod-socket=666

Leave a comment