Traceback (most recent call last):


 "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 292, in _async_add_entity

await entity.async_device_update(warning=False)


 "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 441, in async_device_update

await self.hass.async_add_executor_job(self.update)


 "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run

result = self.fn(*self.args, **self.kwargs)


 "/usr/src/homeassistant/homeassistant/components/google/calendar.py", line 104, in update

self.data.update()


 "/usr/src/homeassistant/homeassistant/util/__init__.py", line 240, in wrapper

result = method(*args, **kwargs)


 "/usr/src/homeassistant/homeassistant/components/google/calendar.py", line 170, in update

service, params = self._prepare_query()


 "/usr/src/homeassistant/homeassistant/components/google/calendar.py", line 133, in _prepare_query

service = self.calendar_service.get()


 "/usr/src/homeassistant/homeassistant/components/google/__init__.py", line 349, in get

http = credentials.authorize(httplib2.Http())
AttributeError: 'NoneType' object has no attribute 'authorize'

Traceback (most recent call last):


 "/tmp/t/venv/bin/pyflakes", line 10, in <module>

sys.exit(main())


 "/tmp/t/venv/lib/python3.6/site-packages/pyflakes/api.py", line 207, in main

warnings = checkRecursive(args, reporter)


 "/tmp/t/venv/lib/python3.6/site-packages/pyflakes/api.py", line 156, in checkRecursive

warnings += checkPath(sourcePath, reporter)


 "/tmp/t/venv/lib/python3.6/site-packages/pyflakes/api.py", line 99, in checkPath

return check(codestr, filename, reporter)


 "/tmp/t/venv/lib/python3.6/site-packages/pyflakes/api.py", line 74, in check

w = checker.Checker(tree, file_tokens=file_tokens, filename=filename)


 "/tmp/t/venv/lib/python3.6/site-packages/pyflakes/checker.py", line 665, in __init__

self.runDeferred(self._deferredFunctions)


 "/tmp/t/venv/lib/python3.6/site-packages/pyflakes/checker.py", line 702, in runDeferred

handler()


 "/tmp/t/venv/lib/python3.6/site-packages/pyflakes/checker.py", line 1410, in <lambda>

self.deferFunction(lambda: self.handleDoctests(node))


 "/tmp/t/venv/lib/python3.6/site-packages/pyflakes/checker.py", line 1148, in handleDoctests

self.addBinding(None, Builtin('_'))


 "/tmp/t/venv/lib/python3.6/site-packages/pyflakes/checker.py", line 870, in addBinding

parent_stmt = self.getParent(value.source)


 "/tmp/t/venv/lib/python3.6/site-packages/pyflakes/checker.py", line 808, in getParent

node = node.parent
AttributeError: 'NoneType' object has no attribute 'parent'
