【问题标题】:Python 2.7 with Adwords API: ImportError: cannot import name AdWordsClient带有 Adwords API 的 Python 2.7:ImportError: cannot import name AdWordsClient
【发布时间】:2013-02-22 17:55:32
【问题描述】:

当我尝试在 Windws 7 中使用带有 Python 2.7 的 Adwords API 时出现以下错误: ImportError: 无法导入名称 AdWordsClient

使用以下代码(我从谷歌示例中获得):

import os
import sys
sys.path.insert(0, os.path.join('..', '..', '..', '..', '..'))

# Import appropriate classes from the client library.
from adspygoogle import AdWordsClient
from adspygoogle.common import Utils

【问题讨论】:

  • 请编辑您的帖子以包含完整的回溯/错误消息。谢谢。
  • 我已经解决了这个问题。我导入了库 fpconst。

标签: python google-ads-api


【解决方案1】:

已经解决了。只需在代码开头添加一行:

import fpconst

【讨论】:

    猜你喜欢
    • 2011-12-09
    • 2020-07-16
    • 2018-11-13
    • 2011-01-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多