Google Calendar Errors

Any ideas??

Config:

google:
  client_id: !secret google_client_id
  client_secret: !secret google_secret
Error executing service <ServiceCall google.scan_for_calendars (c:bf4678e04a7e4827a5528df2daa9fcf3)>
Traceback (most recent call last):
  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 1392, in connect
    super().connect()
  File "/usr/local/lib/python3.6/http/client.py", line 936, in connect
    (self.host,self.port), self.timeout, self.source_address)
  File "/usr/local/lib/python3.6/socket.py", line 704, in create_connection
    for res in getaddrinfo(host, port, 0, SOCK_STREAM):
  File "/usr/local/lib/python3.6/socket.py", line 745, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Try again

During handling of the above exception, another exception occurred:

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
    service = calendar_service.get()
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/google.py", line 253, 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 1002, in _conn_request
    raise ServerNotFoundError("Unable to find the server at %s" % conn.host)
httplib2.ServerNotFoundError: Unable to find the server at www.googleapis.com

Looks like my Google Calendars broke on 2 separate installs of HASS. I tried created a new OAuth ID and Password but that did not help. I’m wondering if the integration is just broken currently? Working for others? Maybe broke on the upgrade of Python or just when updating to newer versions of HASS?

PI3b+, HassOS 1.13, Hass.io super 141, HA 0.84.3. Google calendar integration functioning here.

Thanks for that reply. Digging into my logs. When I tested the URL that failed from my log error message directly in my browser I get more info form Google. Its informing me I’ve gone over my daily limits. Maybe I’ve restarted, etc, too many times today when I was hacking on it. Will give it a fresh try tomorrow.

1 Like

Updated today to 84.3 and tried again and TADA!

I was already on v0.84.3. I just updated and now at 0.84.5, still no go. Back to the logs to see if something changed. I also might try going back through the doc on how to setup Google Calendar fresh and new.

I’ve got another install of HASS that is still running 0.83.3. That one seems to be working correctly still. I’m looking at the Google API control panel. I traffic and request from my 0.83.3 instance but nothing from my other 0.84.5 install.

Finally got it. I went into my Google account and removed my HASS from Third Party Apps with access. Then I went into my HASS install and renamed the file “.google_token” to “.google_token.bak” so HASS will not longer see it. Give it an hour or so for the cloud setting to settle. Restarted my HASS and was then prompted to setup the new token. I had never gotten that prompt before I renamed the old token file. Not sure why my original token stopped working but at least it is now.

2 Likes

Just renaming the token file and rebooting was enough in my case.

1 Like

Rename/delete .google_token in /config/, reboot HA and I was prompted.