i have python flask app in below structure
admin |-app | -__init__.py |-wsgi.py my wsgi.py contents follows
#!/usr/bin/python app import app app import views if __name__ == '__main__': app.run() contents of init.py in app package
#!/usr/bin/python flask import flask app = flask(__name__) i started wsgi below
uwsgi --socket 127.0.0.1:8080 --protocol=http -w wsgi the server started can error in startup log below
*** warning: running uwsgi without master process manager *** processes number limit 709 memory page size 4096 bytes detected max file descriptor number: 256 lock engine: osx spinlocks thunder lock: disabled (you can enable --thunder-lock) uwsgi socket 0 bound tcp address 127.0.0.1:8080 fd 3 python version: 2.7.6 (default, sep 9 2014, 15:04:36) [gcc 4.2.1 compatible apple llvm 6.0 (clang-600.0.39)] *** python threads support disabled. can enable --enable-threads *** python main interpreter initialized @ 0x7fd7eb6000d0 server socket listen backlog limited 100 connections mercy graceful operations on workers 60 seconds mapped 72760 bytes (71 kb) 1 cores *** operational mode: single process *** unable load app 0 (mountpoint='') (callable not found or import error) *** no app loaded. going in full dynamic mode *** *** uwsgi running in multiple interpreter mode *** spawned uwsgi worker 1 (and only) (pid: 70195, cores: 1) similar issues posted whatever solutions offered issues in code. not able find why getting error.
thanks
"callable not found issue" (not import error, suspect). change:
uwsgi --socket 127.0.0.1:8080 --protocol=http -w wsgi
into
uwsgi --socket 127.0.0.1:8080 --protocol=http -w wsgi:app or
uwsgi --socket 127.0.0.1:8080 --protocol=http --module wsgi --callable app
Comments
Post a Comment