Last time. From the Flask documentation:
http://flask.pocoo.org/docs/1.0/api/?highlight=testing#flask.Flask.testing
<http://flask.pocoo.org/docs/1.0/api/?highlight=testing#flask.Flask.testing>
Set app.testing instead of app.debug and exceptions should propagate back to
mod_wsgi and it will log it. You really should though read the Flask
documentation on how to have it log exceptions itself.
And make sure you use those print() statements I keep mentioning to add you own
log message to track things though. So long as don't want to setup logging
properly, and add your own, you will be in the dark.
Good luck.
Graham
> On 11 Sep 2018, at 6:45 pm, Νικόλαος Κούρας <[email protected]> wrote:
>
> Graham okey i'll think i can use this but i will move this to a python forum.
>
> r = subprocess.check_output( 'curl http://superhost.gr/
> <http://superhost.gr/>' + page )
>
> about mod_wsgi:
>
> i moved the .py files to /home/nikos/wsgi folder and decided to leave static/
> and templates/ to public_html
>
> The error_log complains that it cannot find the templates.
> WSGIDaemonProcess clientele user=nikos group=nikos home=/home/nikos/wsgi
>
> Also you told me to put
> application = Flask(__name__)
> app = application
>
> app.debug = True
>
> for seeing errors in browsers but this didnt not work, as i only see
> internal server eror and have to look via console
>
> Στις Τρί, 11 Σεπ 2018 στις 10:54 π.μ., ο/η Graham Dumpleton
> <[email protected] <mailto:[email protected]>> έγραψε:
> Did you add print() statements in your code yet to help you understand when
> code is executing? I keep asking that and you keep ignoring it and show no
> evidence you have done so. You need to do this so you can debug it yourself.
>
> As far as I can tell, your code is hanging because it is possibly going into
> a loop, as the request handler is requesting back onto itself. If you added
> the debug statements, whether this is occurring would be obvious.
>
> At this point, I am sorry, but I can't help you any further. Please go use
> StackOverflow or some other mailing list or forum that can help you with
> general web programming. I don't have the time for this anymore, you have
> already sucked up way too much of my time over this. We solved the mod_wsgi
> configuration issues some time back. This list is for mod_wsgi and not
> general web programming help.
>
>> On 11 Sep 2018, at 5:36 pm, Νίκος Βέργος <[email protected]
>> <mailto:[email protected]>> wrote:
>>
>> I have tried removing WSGIScriptAlias for /clientele and /download enirely
>> as well as putting them beneath '/' alias but i'm still getting the same
>> waiting and waiting when i try for example to invoke superhost.gr/downloads
>> <http://superhost.gr/downloads> request from within.py
>>
>> I understand the logic of python we apps.
>> Before moving to flask and mod_wsgi i was using the same approach for my 3
>> script when i was using cgi mode.
>>
>> Let's say i have 10 mod_wsgi applications than need to be opened from within
>> 'app.py' via requests.get and then take the html output of those and add my
>> counter data to that, how do you suggest i woud do it?
>>
>> Its not practical to take all of the ohter sapps code and place it into
>> app.py code.
>>
>>
>> Τη Τρίτη, 11 Σεπτεμβρίου 2018 - 3:22:36 π.μ. UTC+3, ο χρήστης Graham
>> Dumpleton έγραψε:
>> If you are expecting code below in app.py to be invoked when accessing those
>> URLs, it will not. The WSGIScriptAlias for /clientele and /download will
>> intercept those requests and send them direct to the WSGI applications in
>> the separate .pt files.
>>
>> How are the clientele.py and download.py different/coded?
>>
>> Sounds like you should only have WSGIScriptAlias for / pointing at app.py
>> and not the others. But then, why even need the HTTP request back onto
>> itself. I sort of think your understanding of how web applications in Python
>> work with WSGI are a bit off.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "modwsgi" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected]
>> <mailto:[email protected]>.
>> To post to this group, send email to [email protected]
>> <mailto:[email protected]>.
>> Visit this group at https://groups.google.com/group/modwsgi
>> <https://groups.google.com/group/modwsgi>.
>> For more options, visit https://groups.google.com/d/optout
>> <https://groups.google.com/d/optout>.
>
>
> --
> You received this message because you are subscribed to a topic in the Google
> Groups "modwsgi" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/modwsgi/lZDr6zKcyUg/unsubscribe
> <https://groups.google.com/d/topic/modwsgi/lZDr6zKcyUg/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to
> [email protected]
> <mailto:[email protected]>.
> To post to this group, send email to [email protected]
> <mailto:[email protected]>.
> Visit this group at https://groups.google.com/group/modwsgi
> <https://groups.google.com/group/modwsgi>.
> For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
>
> --
> You received this message because you are subscribed to the Google Groups
> "modwsgi" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected]
> <mailto:[email protected]>.
> To post to this group, send email to [email protected]
> <mailto:[email protected]>.
> Visit this group at https://groups.google.com/group/modwsgi
> <https://groups.google.com/group/modwsgi>.
> For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to the Google Groups
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.