krahabb / meross_lan

Home Assistant integration for Meross devices
MIT License
399 stars 45 forks source link

v5.3.0 failed to load when updated to the latest version #473

Open krahabb opened 3 weeks ago

krahabb commented 3 weeks ago
          This integration stopped working completely, failed to load when I updated to the latest version of the integration today. Don't think it has anything to do with the meross device firmware, I'm on hardware 8.0.0, firmware 8.3.5, but restarting HA throws the following early errors while trying to load the new version during restart:

> 2024-07-10 18:31:07.163 WARNING (SyncWorker_4) [homeassistant.loader] We found a custom integration meross_lan which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
> 2024-07-10 18:31:48.599 ERROR (MainThread) [homeassistant.loader] Unexpected exception importing component custom_components.meross_lan
> File "/config/custom_components/meross_lan/__init__.py", line 24, in <module>
> File "/config/custom_components/meross_lan/helpers/manager.py", line 395
> 2024-07-10 18:31:48.616 ERROR (MainThread) [homeassistant.setup] Setup failed for custom integration meross_lan: Unable to import component: Exception importing custom_components.meross_lan
> File "/config/custom_components/meross_lan/__init__.py", line 24, in <module>
> File "/config/custom_components/meross_lan/helpers/manager.py", line 395
> ImportError: Exception importing custom_components.meross_lan

Home Assistant 2023.10.0, was running integration version Moonlight.2.2 (5.2.2) upgraded to Moonlight.3 and restarted HA

Probably a different issue from yours though, if your integration loads but then fails on one device type.

_Originally posted by @pbrooks29 in https://github.com/krahabb/meross_lan/issues/472#issuecomment-2219929913_

krahabb commented 3 weeks ago

@pbrooks29: yep, totally different issue so I'll open a new one. I guess you've encountered a problem while downloading the update and your files are 'corrupted'. It happens some times and various users had this kind of 'failed loading' right after an update. I don't know why and where this happens but it's usually fixed by redownloading the component.

Ar at least I hope so ;)

famdeg commented 1 week ago

Same problem, return to version 5.2.2.

krahabb commented 1 week ago

I guess I've found the issue, likely related to your HA still running on python 3.11 (see #477) This 'backward compatibility issure' has been fixed a few days ago and the current pre-release (v5.3.1-alpha.1) already has it patched. To enable download of pre-releases in HACS there's an option to enable beta repositories...else it will take a week or so before finally publishing the next 'official' 5.3.1. Else, in any recent HA release (those with python 3.12) 5.3.0 should work.