core: Environment Canada: Unexpected error fetching environment_canada radar data
The problem
Unexpected error in the Environment Canada radar image after installing 2022.4.0b0…It may have something to do with the Generic Camera changes introduced under 2022.4.0.b.0 since the radar image utilizes the generic camara…
The error repeats as well…From the log…
Unexpected error fetching environment_canada radar data: fromstring() got an unexpected keyword argument ‘parser’ 7:17:43 PM – (ERROR) Environment Canada - message first occurred at 6:16:03 AM and shows up 157 times
What version of Home Assistant Core has the issue?
2022.4.b.0
What was the last working version of Home Assistant Core?
2022.3.8
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Environment Canada
Link to integration documentation on our website
https://rc.home-assistant.io/integrations/environment_canada
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Logger: homeassistant.components.environment_canada
Source: components/environment_canada/__init__.py:104
Integration: Environment Canada (documentation, issues)
First occurred: 6:16:03 AM (157 occurrences)
Last logged: 7:17:43 PM
Unexpected error fetching environment_canada radar data: fromstring() got an unexpected keyword argument 'parser'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 190, in _async_refresh
self.data = await self._async_update_data()
File "/usr/src/homeassistant/homeassistant/components/environment_canada/__init__.py", line 104, in _async_update_data
await self.ec_data.update()
File "/usr/local/lib/python3.9/site-packages/env_canada/ec_radar.py", line 315, in update
self.image = await self.get_loop()
File "/usr/local/lib/python3.9/site-packages/env_canada/ec_radar.py", line 321, in get_loop
start, end = await self._get_dimensions()
File "/usr/local/lib/python3.9/site-packages/env_canada/ec_radar.py", line 231, in _get_dimensions
capabilities_tree = et.fromstring(
TypeError: fromstring() got an unexpected keyword argument 'parser'
Additional information
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 61 (31 by maintainers)
Thx @mcfarlde…glad to know its’ also working for you…and thx for reporting the issue… It’s been 8 hrs since i’ve installed 2022.4.2 and no signs for the error…both weather-forecast and picture-glance (radar) are working fine…Glenn we can close the issue…it’s a wrap, folks
It works fully for me again, thanks all.
Also, thanks to @thecode fir getting me going on how to debug a problem such as this!
@kwkid can this be closed this now?
Idiot… the switches are DISABLED by default…I enabled the SWITCHES and everything is fine…No errors coming from EC either… will monitor but i think i’m good
Excuse me for butting in here…but i took @gwww advice and built a parallel HA using the most current vmdk (VMware file). I then did a partial restore of my current HA with only the official add-ons i have installed restored (ie. SSH, MariaDB, Grafana, etc…) ensuring my parallel environment had the same IP address as my current HA (my current HA was powered off to avoid IP conflicts) Once the restore was completed, i began the one-by one update… My HA was 2022.4.1…I first started first with EC (not your modified one but the one via Integration page) which installed fine and worked just fine…I then added in all my lovelace frontend extensions…this too made EC work just fine. With each added integration i rebooted HA and took backups…I then applied my Blink camera integration, rebooted and observed EC…was just fine… My next integration was Logitech Harmony Hub, configured and rebooted…EC started throwing the same exception again…Interesting i thought…I restored HA back and went on with my 4 custom components…all installed fine and EC too was working fine…both weather-forecast and picture-glance (radar)…i then backed up this parallel HA environment and restored my current HA back… EC was still throwing the same error…I disabled the Logitech Harmony Hub integration and rebooted…EC was working just fine with NO errors…I left things in place until this morning…Usually in the mornings i had over 100+ errors thrown but today with the LHH disabled…the logs where clean… EC was working just fine…both cards
If you search homeassistant core with Logitech Harmony Hub on GitHub i came across a post where something was done / changed during 2022.4.0 beta testing…Not really sure what was done but this is when my issues started…Perhaps a dependency changed on LHH which was causing my error to trigger…
So i removed all my custom components including EC under 2022.0b3… the includes folders from /config/custom_components, configuration.yaml and Integration page… rebooted HA… I installed back EC, configured it and rebooted HA… When i went back in the weather-forecast card was working fine…picture-glance (ie. camera.<locale>_radar) was not working and the error was being thrown… reverted back to 2022.3.8…everything is working as planned…will wait for the 2022.4 official release this week and try again…fingers crossed…if there is something wierd going on…perhaps the greater community will log an issue with a lead to actually what’s going on… thx for all your help…
If something had changed in the project wouldn’t it have failed in my test of the beta as well? I used a cleanly built devcontainer and it worked fine.
back to 2022.4.0b3…EC integration via the UI…dropped the custom component…still getting the same exception and the picture-glance is NOT working…no radar visible… enough fun for today… thx for your help gwww…once 2024.4 is released…i will rollback to 2022.3.8…and then upgrade to 2022.4…fingers crossed
with the custom integration running…the picture-glance card is now working showing the animated gif just fine…weather forecast is working too
Above steps are completed…HA restarted… With default: info there’s alot more off information in the log file now…no surprise…
EnvCan.txt
Can you reproduce the problem in 2022.4.0b3? you can checkout the b3 branch by using
git checkout tags/2022.4.0b3if you can reproduce it there you can try to debug or compare changes to dev branch, we can try to discuss other options on discord if you want.