I am trying to import the modules necessary to access the google calendar APIs, but the program errors on the line: 'from googleapiclient import discovery' and comes up with this error message
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'
It only does this in the directory I currently have the python file in. I have a few other programs that use the same boilerplate code which don't show this error. Any ideas?
Thanks