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

John Hall johnhall2.0 at gmail.com
Sat Oct 5 05:37:43 CEST 2013


David,
uWSGI definitely works but I have found it's tricky to get the settings and
setup right - so - I am not an expert, but i'd say the answer is that the
way your script is used by uWSGI  ___main__ !=  "__main__" so that part of
your code is not executed.  You just need to import / setup  what you need
for your app and put the block of code outside of the conditional block,
 like the example for apache mod_wsgi in the doc page referenced by Lukasz
.



On Fri, Oct 4, 2013 at 11:26 PM, David Montgomery <davidmontgomery at gmail.com
> wrote:

> So..in sum..if I use localhost..all works..there are no errors in my app.
> I use uwsgi ....bottle will not  work despite using application =
> default_app()...and I am geussing an uWSGI issue
>
> So..why will uwsgi not work with bottle?
>
> Thanks
>
>
> On Sat, Oct 5, 2013 at 9:55 AM, David Montgomery <
> davidmontgomery at gmail.com> wrote:
>
>> Already doing that
>> from bottle import route, run, default_app, request, response,
>> get,redirect
>> if __name__ == "__main__":
>>
>>     os.chdir(os.path.dirname(__file__))
>>     application = default_app()
>>
>>
>> On Sat, Oct 5, 2013 at 8:04 AM, Łukasz Mierzwa <l.mierzwa at gmail.com>wrote:
>>
>>> Looking at lines:
>>>
>>>
>>> Bottle v0.11.6 server starting up (using WSGIRefServer())...
>>> Listening on http://localhost:8048/
>>> Hit Ctrl-C to quit.
>>>
>>> suggest that in pixel_server.py you are calling bottle.run() which
>>> spawns bottle built-in http server. If so then --wsgi-file should point to
>>> file containing:
>>>
>>> import bottle
>>> application = bottle.default_app()
>>>
>>> as in http://bottlepy.org/docs/dev/deployment.html#apache-mod-wsgi
>>> uWSGI expects standard WSGI application script that will return
>>> application object.
>>>
>>>
>>>
>>> 2013/10/5 David Montgomery <davidmontgomery at gmail.com>
>>>
>>>>  --- no python application found, check your startup logs for errors
>>>> ---
>>>> {address space usage: 87171072 bytes/83MB} {rss usage: 17674240
>>>> bytes/16MB} [pid: 29393|app: -1|req: -1/11] ddfdf  () {40 vars in 663
>>>> bytes} [Fri Oct  4 23:33:26 2013] GET /pixel/ => generated 21 bytes in 0
>>>> msecs (HTTP/1.1 500) 1 headers in 57 bytes (1 switches on core 19)
>>>>
>>>> Why is the above happening?
>>>>
>>>> /usr/local/bin/uwsgi --loop gevent --carbon xxx.xxx.xxx.xxx:2003
>>>> --socket 127.0.0.1:8070 --processes 1 --pp
>>>> /home/ubuntu/workspace/devops/ --wsgi-file
>>>> /home/ubuntu/workspace/devops/servers/pixel_server.py -b 32768 --master
>>>> --gevent 20 --enable-threads --listen 2048 --memory-report --logto2
>>>> /tmp/pixel.log
>>>>
>>>> The file is there.  Yet I get no python application found?  How does
>>>> one get uwsgi to work?
>>>>
>>>>
>>>> I I run hte below from the command line..I do nit have a problem
>>>> python pixel_server.py
>>>> Bottle v0.11.6 server starting up (using WSGIRefServer())...
>>>> Listening on http://localhost:8048/
>>>> Hit Ctrl-C to quit.
>>>> localhost - - [04/Oct/2013 23:43:37] "GET /pixel HTTP/1.1" 200 42
>>>> localhost - - [04/Oct/2013 23:43:42] "GET /pixel HTTP/1.1" 200 42
>>>>
>>>> If I were to use uwsgi.,,,it does not work and at a loss.
>>>>
>>>> I am using nginx so...
>>>>
>>>> Thanks
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> uWSGI mailing list
>>>> uWSGI at lists.unbit.it
>>>> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
>>>>
>>>>
>>>
>>>
>>> --
>>> Łukasz Mierzwa
>>>
>>> _______________________________________________
>>> uWSGI mailing list
>>> uWSGI at lists.unbit.it
>>> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
>>>
>>>
>>
>
> _______________________________________________
> uWSGI mailing list
> uWSGI at lists.unbit.it
> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.unbit.it/pipermail/uwsgi/attachments/20131004/ad8d5e93/attachment.html>


More information about the uWSGI mailing list