core icon indicating copy to clipboard operation
core copied to clipboard

Google Calendar Integration ERROR

Open MrThiemann opened this issue 2 years ago • 8 comments

The problem

Hey,

i have an error with my Google Calendar Integration.

Component error: google - No module named 'ical.timespan'

After reboot the Notifications show me an warning Bildschirmfoto 2022-11-05 um 22 09 00

Bildschirmfoto 2022-11-05 um 22 09 14

Bildschirmfoto 2022-11-05 um 22 09 19

When i click on the google-link (https://www.home-assistant.io/integrations/calendar.google/) i became an error-page.

On my Integrations-Page i saw this to my google-calendar-integration Bildschirmfoto 2022-11-05 um 22 38 09

as you can se, the integratio is already installed and works perfectly until a few days ago.

But i can not uninstall it! And when i trust install an new calendar integration i became this error: Bildschirmfoto 2022-11-05 um 22 12 24

Also i have tried to remove the code in the core.config_entries

then the integration is no longer displayed to me and I can also delete "login data". But as soon as I try to add the integration again, I get the same error message again.

I don't know what else to try....

What version of Home Assistant Core has the issue?

2022.11.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Google Calendar

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

MrThiemann avatar Nov 05 '22 21:11 MrThiemann

Hey there @allenporter, mind taking a look at this issue as it has been labeled with an integration (google) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of google can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Change the title of the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign google Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


google documentation google source (message by IssueLinks)

home-assistant[bot] avatar Nov 05 '22 21:11 home-assistant[bot]

Somehow the dependency is missing. This is really home assistant OS?

allenporter avatar Nov 05 '22 21:11 allenporter

oh sorry, it's supervised

Bildschirmfoto 2022-11-05 um 22 54 31

MrThiemann avatar Nov 05 '22 21:11 MrThiemann

i downgraded with: ha core update --version 2022.10.4

then i should delete the integration. After that i can reinstall that, connect it to google and after an update again to 2022.11.2 but the integration cannot load again

MrThiemann avatar Nov 05 '22 22:11 MrThiemann

Ok it seems like maybe the ical dependency is not being installed for some reason. Do you typically have to manually install python dependencies? I was expecting it to get loaded automatically...

allenporter avatar Nov 05 '22 22:11 allenporter

Do you typically have to manually install python dependencies?

no, I haven't had to do that yet.

MrThiemann avatar Nov 06 '22 09:11 MrThiemann

I just discovered another error message. maybe that will help too?

When i downgrade to version: 2022.11.0

` Logger: aiohttp.server Source: components/google/init.py:10 First occurred: 09:12:03 (2 occurrences) Last logged: 09:12:17

Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request resp = await request_handler(request) File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle resp = await handler(request) File "/usr/local/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 222, in forwarded_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 82, in ban_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 136, in handle result = await result File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 86, in delete result = await hass.config_entries.async_remove(entry_id) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 925, in async_remove await entry.async_remove(self.hass) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 534, in async_remove component = integration.get_component() File "/usr/src/homeassistant/homeassistant/loader.py", line 709, in get_component cache[self.domain] = importlib.import_module(self.pkg_path) File "/usr/local/lib/python3.10/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1006, in _find_and_load_unlocked File "", line 688, in _load_unlocked File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "/usr/src/homeassistant/homeassistant/components/google/init.py", line 10, in from gcal_sync.api import GoogleCalendarService File "/usr/local/lib/python3.10/site-packages/gcal_sync/api.py", line 33, in from .model import EVENT_FIELDS, Calendar, Event File "/usr/local/lib/python3.10/site-packages/gcal_sync/model.py", line 17, in from ical.timespan import Timespan ModuleNotFoundError: No module named 'ical.timespan'

`

MrThiemann avatar Nov 06 '22 09:11 MrThiemann

but when iam on version [2022.10.5] it works all normaly... hmm

MrThiemann avatar Nov 06 '22 09:11 MrThiemann

Yes, 2022.11 has a dependency on an update of the gcal_sync library which has a dependency on the ical library. which has a module timespan. For some reason, you don't have ical installed.

When I read the supervisor requirements it says that your required expertise is to maintain the home assistant install... does that mean you are responsible for all its dependencies as well?

allenporter avatar Nov 07 '22 04:11 allenporter

When I read the supervisor requirements it says that your required expertise is to maintain the home assistant install... does that mean you are responsible for all its dependencies as well?

I can hear that now too. But then he must have deleted the dependency when switching to a new version? Or was it not necessary before and that's why it didn't work? but this "classic" installation doesn't even allow you to install additional packages. Otherwise I have to set up a Debian again and then use HASSOS. (There I would have maximum possibilities there)

MrThiemann avatar Nov 07 '22 04:11 MrThiemann

Yes, the dependency was added in 2022.11

allenporter avatar Nov 07 '22 04:11 allenporter

oh sorry, it's supervised

The screenshot you posted indicates the Host Operating System is "Home Assistant OS 9.3" so the installation type is Home Assistant OS. This operating system should, in theory, contain everything Home Assistant needs.

If it were Home Assistant Supervised, the Host Operating System would indicate "Debian GNU/Linux 11 (bullseye)" or whatever linux distro you installed.

tdejneka avatar Nov 08 '22 20:11 tdejneka

The screenshot you posted indicates the Host Operating System is "Home Assistant OS 9.3" so the installation type is Home Assistant OS. This operating system should, in theory, contain everything Home Assistant needs.

yes, that's what I mean, too...

I used the installation-script (Home Assistant OS VM) on GitHub from "tteck" (https://tteck.github.io/Proxmox/)


A friend of mine had the same problem that he didn't get the calendar displayed. For example, we had both local-calendar installed.

after he uninstalled it, he was able to access the google integration again. he wrote me the following:

Deleted the entities, deleted the pycache in the HA container under /usr/src/homeassistant/homeassistant/components/google and then downgraded with ha core update --version 2022.10.4. After that, the integration could be removed. I just remembered that I also uninstalled the integration for the local ICAL calendar and the ICAL sensor in between.

maybe it's somehow related?


I've got a new system running. Everything works smoothly here Bildschirmfoto 2022-11-09 um 05 58 15

MrThiemann avatar Nov 09 '22 04:11 MrThiemann

You installed a local calendar custom component? Yes, that is the problem

allenporter avatar Nov 09 '22 05:11 allenporter

You installed a local calendar custom component? Yes, that is the problem

yes, i installed your hass-local-calendar

MrThiemann avatar Nov 09 '22 05:11 MrThiemann

OK, that is setting the wrong ical version, and the custom component will need an update to a newer version of the ical library since they share a library.

allenporter avatar Nov 09 '22 05:11 allenporter