【问题标题】:Errors in the Youtube API v3 python examplesYoutube API v3 python 示例中的错误
【发布时间】:2015-06-21 18:57:47
【问题描述】:

因为 Youtube 工程师使用与 Youtube API v3 相关的标签来监控堆栈溢出

执行时:

#!/usr/bin/python

from apiclient.discovery import build
from apiclient.errors import HttpError
from oauth2client.tools import argparser

我收到以下错误:

从 apiclient.discovery 导入构建 ImportError: 没有名为 apiclient.discovery 的模块

请 Google 工程师更正这些示例,以免开始使用 API 的人遇到此类错误。

【问题讨论】:

标签: python youtube-api youtube-data-api


【解决方案1】:

随着这些细微的变化,错误消失了:

from googleapiclient.discovery import build
from googleapiclient.errors import HttpError
from oauth2client.tools import argparser

这一切都适用于 Python 2.7.X

【讨论】:

    猜你喜欢
    • 2013-05-31
    • 1970-01-01
    • 2015-04-28
    • 2016-11-28
    • 2015-12-12
    • 2023-03-30
    • 2013-05-31
    • 1970-01-01
    • 2013-06-14
    相关资源
    最近更新 更多