3

I have my proxy setup in my environment and python does see it. If I do os.environ['http_proxy'], I do see the proxy specified (and all of my other applications use it).

However, when I try to use the python google client api (calendar), it appears it isn't being used even though a rough inspection indicates the default http instance is using proxy from environment.

 service, flags = sample_tools.init(
        argv, 'calendar', 'v3', __doc__, __file__,
        scope='https://www.googleapis.com/auth/calendar'
    )

Inside that call, I see it is doing:

http = credentials.authorize(http = httplib2.Http())

Which ultimately is doing:

def __init__(self, cache=None, timeout=None,
                 proxy_info=proxy_info_from_environment,
                 ca_certs=None, disable_ssl_certificate_validation=False):

Shouldn't the proxy_info_from_environment be picking it up? On a side note, when I added a breakpoint inside that function, it was never hit. Obviously, that is the reason I'm not getting it set up with the proxy, but it should be, right?

Walter
  • 1,290
  • 2
  • 21
  • 46
  • Possible duplicate of [Google API + proxy + httplib2](https://stackoverflow.com/questions/36784437/google-api-proxy-httplib2) – El Asiduo Oct 26 '17 at 15:00

0 Answers0