What do you get if you add:
import sys
import requests
print(type(sys.modules['requests'])
print(type(requests))
It looks a bit like some fancy is being done with delayed module loader as a
real module should have a __file__ attribute.
Graham
> On 29 Sep 2017, at 8:56 am,
Hi Graham,
Here's what we're getting when we attempt to access the __file__ attribute
of the imported requests library:
[Thu Sep 28 15:37:30.406608 2017] [wsgi:info] [pid 9408:tid
139645478971136] mod_wsgi (pid=9408): Create interpreter
'dev.api.serviceoperations.mydomain.com|'.
[Thu Sep 28
Hi Bill,
Thanks for your reply. This was one of the first things we looked at a week
or two ago. We even tried importing requests as a different module name.
This exact same code will run properly when the Flask module is run
directly with the python interpreter from our virtualenv. If we
> On 29 Sep 2017, at 5:51 am, Bill Freeman wrote:
>
> Do you have a module of your own named "requests" that is being confused,
> somehow, with the installed package?
> Or might you be importing something "as requests"?
The way to determine that is to add somewhere in your
Do you have a module of your own named "requests" that is being confused,
somehow, with the installed package?
Or might you be importing something "as requests"?
On Thu, Sep 28, 2017 at 12:02 PM, Chris Barton <
ch...@chrisbartonphotography.com> wrote:
> Hello,
>
> I've been working on the
Hello,
I've been working on the deployment of a Flask application using
mod_wsgi4.5.18 (compiled against Python3.6.1) and have been encountering
issues with the requests library that only seem to manifest when the Flask
app is run from behind Apache & mod_wsgi. When the app is invoked from the