You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Google AdWords API报错:AttributeError: 'HTTPSConnectionWithTimeout'无proxy_info属性

Fixing AttributeError: 'HTTPSConnectionWithTimeout' object has no attribute 'proxy_info' in Google AdWords API

Hey there, let’s work through this error you’re hitting with the Google AdWords Python library. This issue almost always boils down to version incompatibility between the legacy googleads-python-lib and the httplib2 library you have installed. Here’s how to fix it step by step:

1. Downgrade httplib2 to a compatible version

The older googleads-python-lib relies on specific methods in httplib2 that were removed or refactored in versions after 0.20.0. To resolve the missing proxy_info attribute error:

  • Open your terminal or command prompt
  • Run this command to install a compatible version of httplib2:
    pip install httplib2==0.19.0
    
  • After installation, try running your AdWords API call again. This should fix the attribute mismatch, since the 0.19.0 version still includes the proxy_info property the legacy library expects.

2. Double-check your googleads.yaml proxy configuration (if applicable)

If you’ve set up a proxy in your googleads.yaml file, confirm the format is correct. A valid proxy entry should look like this:

proxy: http://user:password@proxy.example.com:8080

While versioning is the main culprit here, an incorrectly formatted proxy can sometimes trigger related connection errors, so it’s worth verifying this is set properly.

3. Consider upgrading to the official Google Ads API library (optional)

Note that googleads-python-lib is a legacy tool for the older AdWords API. Google now recommends using the newer google-ads library for the Google Ads API (which replaces the AdWords API). If you’re starting a new project or can migrate, switching to this library will avoid these legacy version compatibility issues entirely. Install it with:

pip install google-ads

Once you try the first step (downgrading httplib2), your API calls should start working as expected without the proxy_info attribute error.

内容的提问来源于stack exchange,提问作者wendybear

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.21 07:42:11