来自googleapiclient导入发现的'的ImportError'

时间:2017-09-17 14:34:08

标签: python python-3.x google-api-client

我正在尝试导入访问Google日历API所需的模块,但该行上的程序错误: '来自googleapiclient导入发现' 并提出此错误消息

Traceback (most recent call last):
  File "C:/Users/Jake/Documents/Programming/Python/google apis/calendar/calendar.py", line 3, in <module>
from apiclient import discovery
File "C:\Python36\lib\site-packages\apiclient\__init__.py", line 19, in <module>
from googleapiclient import discovery
File "C:\Python36\lib\site-packages\googleapiclient\discovery.py", line 32, in <module>
from six.moves import http_client
File "C:\Python36\lib\site-packages\six.py", line 92, in __get__
result = self._resolve()
File "C:\Python36\lib\site-packages\six.py", line 115, in _resolve
return _import_module(self.mod)
File "C:\Python36\lib\site-packages\six.py", line 82, in _import_module
__import__(name)
File "C:\Python36\lib\http\client.py", line 71, in <module>
import email.parser
File "C:\Python36\lib\email\parser.py", line 12, in <module>
from email.feedparser import FeedParser, BytesFeedParser
File "C:\Python36\lib\email\feedparser.py", line 27, in <module>
from email._policybase import compat32
File "C:\Python36\lib\email\_policybase.py", line 9, in <module>
from email.utils import _has_surrogates
File "C:\Python36\lib\email\utils.py", line 33, in <module>
from email._parseaddr import quote
File "C:\Python36\lib\email\_parseaddr.py", line 16, in <module>
import time, calendar
File "C:/Users/Jake/Documents/Programming/Python/google apis/calendar\calendar.py", line 3, in <module>
from apiclient import discovery
ImportError: cannot import name 'discovery'

它只在我目前拥有python文件的目录中执行此操作。我有一些其他程序使用相同的样板代码,但不显示此错误。有什么想法吗?

由于

0 个答案:

没有答案