Google calendar component problem

Hi, I’m getting this error while trying to configure my google calendar component.
Anyone has the same problem?

I"m on the latest version of HASSIO

2018-10-01 20:10:56 WARNING (MainThread) [homeassistant.components.calendar] Setup of platform google is taking over 10 seconds.
2018-10-01 20:10:56 WARNING (MainThread) [homeassistant.components.calendar] Setup of platform google is taking over 10 seconds.
2018-10-01 20:11:16 ERROR (MainThread) [homeassistant.components.calendar] Error while setting up platform google
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 128, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/calendar/google.py", line 39, in setup_platform
    for data in disc_info[CONF_ENTITIES] if data[CONF_TRACK]])
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/calendar/google.py", line 39, in <listcomp>
    for data in disc_info[CONF_ENTITIES] if data[CONF_TRACK]])
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/calendar/google.py", line 51, in __init__
    super().__init__(hass, data)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/calendar/__init__.py", line 89, in __init__
    self.update()
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/calendar/__init__.py", line 155, in update
    if not self.data or not self.data.update():
  File "/usr/local/lib/python3.6/site-packages/homeassistant/util/__init__.py", line 324, in wrapper
    result = method(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/calendar/google.py", line 108, in update
    service, params = self._prepare_query()
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/calendar/google.py", line 74, in _prepare_query
    service = self.calendar_service.get()
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/google.py", line 249, in get
    'calendar', 'v3', http=http, cache_discovery=False)
  File "/usr/local/lib/python3.6/site-packages/oauth2client/_helpers.py", line 133, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/googleapiclient/discovery.py", line 229, in build
    requested_url, discovery_http, cache_discovery, cache)
  File "/usr/local/lib/python3.6/site-packages/googleapiclient/discovery.py", line 276, in _retrieve_discovery_doc
    resp, content = http.request(actual_url)
  File "/usr/local/lib/python3.6/site-packages/oauth2client/transport.py", line 175, in new_request
    redirections, connection_type)
  File "/usr/local/lib/python3.6/site-packages/oauth2client/transport.py", line 282, in request
    connection_type=connection_type)
  File "/usr/local/lib/python3.6/site-packages/httplib2/__init__.py", line 1322, in request
    (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
  File "/usr/local/lib/python3.6/site-packages/httplib2/__init__.py", line 1072, in _request
    (response, content) = self._conn_request(conn, request_uri, method, body, headers)
  File "/usr/local/lib/python3.6/site-packages/httplib2/__init__.py", line 995, in _conn_request
    conn.connect()
  File "/usr/local/lib/python3.6/http/client.py", line 1400, in connect
    server_hostname=server_hostname)
  File "/usr/local/lib/python3.6/ssl.py", line 407, in wrap_socket
    _context=self, _session=session)
  File "/usr/local/lib/python3.6/ssl.py", line 814, in __init__
    self.do_handshake()
  File "/usr/local/lib/python3.6/ssl.py", line 1068, in do_handshake
    self._sslobj.do_handshake()
  File "/usr/local/lib/python3.6/ssl.py", line 689, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:841)
2018-10-01 20:11:20 ERROR (MainThread) [homeassistant.core] Error executing service <ServiceCall google.scan_for_calendars (c:b03ac4f39a684ba29964e0e42fb6ce3e)>
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/core.py", line 1185, in _event_to_service_call
    await self._hass.async_add_executor_job(execute_service)
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/core.py", line 1182, in execute_service
    service_handler.func(service_call)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/google.py", line 200, in _scan_for_calendars
    service = calendar_service.get()
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/google.py", line 249, in get
    'calendar', 'v3', http=http, cache_discovery=False)
  File "/usr/local/lib/python3.6/site-packages/oauth2client/_helpers.py", line 133, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/googleapiclient/discovery.py", line 229, in build
    requested_url, discovery_http, cache_discovery, cache)
  File "/usr/local/lib/python3.6/site-packages/googleapiclient/discovery.py", line 276, in _retrieve_discovery_doc
    resp, content = http.request(actual_url)
  File "/usr/local/lib/python3.6/site-packages/oauth2client/transport.py", line 175, in new_request
    redirections, connection_type)
  File "/usr/local/lib/python3.6/site-packages/oauth2client/transport.py", line 282, in request
    connection_type=connection_type)
  File "/usr/local/lib/python3.6/site-packages/httplib2/__init__.py", line 1322, in request
    (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
  File "/usr/local/lib/python3.6/site-packages/httplib2/__init__.py", line 1072, in _request
    (response, content) = self._conn_request(conn, request_uri, method, body, headers)
  File "/usr/local/lib/python3.6/site-packages/httplib2/__init__.py", line 995, in _conn_request
    conn.connect()
  File "/usr/local/lib/python3.6/http/client.py", line 1400, in connect
    server_hostname=server_hostname)
  File "/usr/local/lib/python3.6/ssl.py", line 407, in wrap_socket
    _context=self, _session=session)
  File "/usr/local/lib/python3.6/ssl.py", line 814, in __init__
    self.do_handshake()
  File "/usr/local/lib/python3.6/ssl.py", line 1068, in do_handshake
    self._sslobj.do_handshake()
  File "/usr/local/lib/python3.6/ssl.py", line 689, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:841)
2018-10-01 20:11:21 ERROR (MainThread) [homeassistant.components.calendar] Error while setting up platform google
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 128, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/calendar/google.py", line 39, in setup_platform
    for data in disc_info[CONF_ENTITIES] if data[CONF_TRACK]])
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/calendar/google.py", line 39, in <listcomp>
    for data in disc_info[CONF_ENTITIES] if data[CONF_TRACK]])
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/calendar/google.py", line 51, in __init__
    super().__init__(hass, data)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/calendar/__init__.py", line 89, in __init__
    self.update()
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/calendar/__init__.py", line 155, in update
    if not self.data or not self.data.update():
  File "/usr/local/lib/python3.6/site-packages/homeassistant/util/__init__.py", line 324, in wrapper
    result = method(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/calendar/google.py", line 108, in update
    service, params = self._prepare_query()
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/calendar/google.py", line 74, in _prepare_query
    service = self.calendar_service.get()
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/google.py", line 249, in get
    'calendar', 'v3', http=http, cache_discovery=False)
  File "/usr/local/lib/python3.6/site-packages/oauth2client/_helpers.py", line 133, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/googleapiclient/discovery.py", line 229, in build
    requested_url, discovery_http, cache_discovery, cache)
  File "/usr/local/lib/python3.6/site-packages/googleapiclient/discovery.py", line 276, in _retrieve_discovery_doc
    resp, content = http.request(actual_url)
  File "/usr/local/lib/python3.6/site-packages/oauth2client/transport.py", line 175, in new_request
    redirections, connection_type)
  File "/usr/local/lib/python3.6/site-packages/oauth2client/transport.py", line 282, in request
    connection_type=connection_type)
  File "/usr/local/lib/python3.6/site-packages/httplib2/__init__.py", line 1322, in request
    (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
  File "/usr/local/lib/python3.6/site-packages/httplib2/__init__.py", line 1072, in _request
    (response, content) = self._conn_request(conn, request_uri, method, body, headers)
  File "/usr/local/lib/python3.6/site-packages/httplib2/__init__.py", line 995, in _conn_request
    conn.connect()
  File "/usr/local/lib/python3.6/http/client.py", line 1400, in connect
    server_hostname=server_hostname)
  File "/usr/local/lib/python3.6/ssl.py", line 407, in wrap_socket
    _context=self, _session=session)
  File "/usr/local/lib/python3.6/ssl.py", line 814, in __init__
    self.do_handshake()
  File "/usr/local/lib/python3.6/ssl.py", line 1068, in do_handshake
    self._sslobj.do_handshake()
  File "/usr/local/lib/python3.6/ssl.py", line 689, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:841)

I have this problem

Error executing service <ServiceCall google.scan_for_calendars (c:f7ee200774984d9ea97c514863eb21d9)>
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/homeassistant/core.py”, line 1185, in _event_to_service_call
await self._hass.async_add_executor_job(execute_service)
File “/usr/local/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/local/lib/python3.6/site-packages/homeassistant/core.py”, line 1182, in execute_service
service_handler.func(service_call)
File “/usr/local/lib/python3.6/site-packages/homeassistant/components/google.py”, line 202, in _scan_for_calendars
calendars = cal_list.list().execute()[‘items’]
File “/usr/local/lib/python3.6/site-packages/oauth2client/_helpers.py”, line 133, in positional_wrapper
return wrapped(*args, **kwargs)
File “/usr/local/lib/python3.6/site-packages/googleapiclient/http.py”, line 837, in execute
method=str(self.method), body=self.body, headers=self.headers)
File “/usr/local/lib/python3.6/site-packages/googleapiclient/http.py”, line 163, in _retry_request
resp, content = http.request(uri, method, *args, **kwargs)
File “/usr/local/lib/python3.6/site-packages/oauth2client/transport.py”, line 186, in new_request
credentials._refresh(orig_request_method)
File “/usr/local/lib/python3.6/site-packages/oauth2client/client.py”, line 756, in _refresh
self._do_refresh_request(http)
File “/usr/local/lib/python3.6/site-packages/oauth2client/client.py”, line 812, in _do_refresh_request
raise HttpAccessTokenRefreshError(error_msg, status=resp.status)
oauth2client.client.HttpAccessTokenRefreshError: invalid_grant: Bad Request

Me too… Any news?

Started having issues too. I looked at my Google API and there is no hits for the calendar API

Here’s the error message I’ve found in my logs:

2018-10-20 23:57:54 ERROR (MainThread) [homeassistant.core] Error executing service <ServiceCall google.scan_for_calendars (c:8e2b45906d6c4e93a89f85df56b194cd)>
AttributeError: 'NoneType' object has no attribute 'authorize'

Has anyone raised this issue on Github?

2 Likes

For those facing the same issue, see Google calendar problems