uWSGI module found when invoked on the command line but not when invoked using emperor
Question: I have a python wsgi application which I am running under uWSGI.

When I try to run the same application using emperor I get an error -

    
    
    ImportError: No module named app_thing
    unable to load app 0 (mountpoint='') (callable not found or import error)
    *** no app loaded. going in full dynamic mode ***
    

If I run uWSGI directly specifying the same config file that emperor is using
it finds the module and the application works.

uWSGI config file below.

    
    
    [uwsgi]
    socket = 127.0.0.1:8000
    workers = 1
    force-cwd = /home/user/py
    module = app_thing:application
    protocol = http
    

Any help appreciated...


Answer: Ok, turns out the fix involved setting the file rather than the module and
also adding the dir to the python path in the uWSGI config. Final config ended
up as

    
    
        [uwsgi]
        socket = 127.0.0.1:8000
        workers = 1
        force-cwd = /home/py
        file = /home/py/app_thing.py
        pythonpath = /home/py
    

