mbillow / ha-chargepoint

Home Assistant ChargePoint EV Charger Integration
MIT License
44 stars 6 forks source link

Detected blocking call to open inside the event loop #44

Open SeanPM5 opened 1 month ago

SeanPM5 commented 1 month ago

Get warnings in log related to ChargePoint integration after updating to Home Assistant 2024.6 (in beta now), with recommendation to report issue. So here it is:

Logger: homeassistant.util.loop
Source: util/loop.py:81
First occurred: May 30, 2024 at 11:29:09 PM (56 occurrences)
Last logged: 1:33:45 AM

Detected blocking call to open inside the event loop by custom integration 'chargepoint' at custom_components/chargepoint/__init__.py, line 80: with open(file, "r") as spf: (offender: /config/custom_components/chargepoint/__init__.py, line 80: with open(file, "r") as spf:), please create a bug report at https://github.com/mbillow/ha-chargepoint/issues

Detected blocking call to open inside the event loop by custom integration 'chargepoint' at custom_components/chargepoint/__init__.py, line 64: with open(file, "r") as spf: (offender: /config/custom_components/chargepoint/__init__.py, line 64: with open(file, "r") as spf:), please create a bug report at https://github.com/mbillow/ha-chargepoint/issues

Detected blocking call to open inside the event loop by custom integration 'chargepoint' at custom_components/chargepoint/__init__.py, line 71: with open(os.open(file, os.O_CREAT | os.O_WRONLY, 0o600), "w") as spf: (offender: /config/custom_components/chargepoint/__init__.py, line 71: with open(os.open(file, os.O_CREAT | os.O_WRONLY, 0o600), "w") as spf:), please create a bug report at https://github.com/mbillow/ha-chargepoint/issues
julio8a commented 2 weeks ago

I'm getting the same. My 60+ devices using MQTT were not working because of this integration so had to temporarily disabled until there's a fix.


2024-06-18 15:15:28.159 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open inside the event loop by custom integration 'chargepoint' at custom_components/chargepoint/__init__.py, line 71: with open(os.open(file, os.O_CREAT | os.O_WRONLY, 0o600), "w") as spf: (offender: /config/custom_components/chargepoint/__init__.py, line 71: with open(os.open(file, os.O_CREAT | os.O_WRONLY, 0o600), "w") as spf:), please create a bug report at https://github.com/mbillow/ha-chargepoint/issues
flavio-fernandes commented 1 week ago

/cc @flavio-fernandes

julio8a commented 1 week ago

Cc @mbillow

mbillow commented 1 week ago

Happy to review/release PRs if someone wants to fix this. Otherwise, it might be a bit before I have the time to look.