> On 10 Sep 2018, at 11:52 am, Νίκος Βέργος <[email protected]> > wrote: > > Graham i know you helped me a lot but my script cannot work if i don;t het > this oe sorted out and i'am trying for hours allready. > > Please do help. > > > > I have 3 wsgi scripts listening on 3 locations. What i'm trying to run an > wsgi script from within another wsgi script with the following statement. > > > > page = 'clientele' > pdata = requests.get( 'http://superhost.gr/' + page ) > pdata = pdata.text + counter Have you tried to add print() statements into your code, when it is running and what variables are at each point? If you use print(), what you print will appear in the Apache error log so you can see it. As per example in requests docs at:
http://docs.python-requests.org/en/master/ <http://docs.python-requests.org/en/master/> you don't even appear to check the response status code. Check such things, print out the values and see what it is getting. > page = the location of another wsgi app. > > The error i'am getting when for i.e i try to load > http://superhost.gr/clientele <http://superhost.gr/clientele> > > mod_wsgi (pid=7152): Exception occurred processing WSGI script > '/home/nikos/public_html/app.py' > OSError: Apache/mod_wsgi failed to write response data: Broken pipe. This specific message from mod_wsgi indicates that the HTTP client making the request dropped the connection before the server could write the response. So possibly an error is occurring in app.py if that is what is calling it. Have you enabled Flask debug so that errors are shown in the browser for you. If you don't, Flask will just return a 500 error and may not actually log anything about the error. You may need to set up Flask logging so that it logs details of exceptions to the error log. http://flask.pocoo.org/docs/1.0/logging/#logging <http://flask.pocoo.org/docs/1.0/logging/#logging>The other script by itself executes normally but NOT from within my app.py script. > > Any ideas on how to execute a wsgi app (b) from within a wsgi app(a) and > store the response as html data? > > > -- > 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.
