Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Platform Error: Cannot Import Name EventStateChangedData #133

Closed
4 tasks done
glbailey opened this issue May 20, 2024 · 0 comments
Closed
4 tasks done

Platform Error: Cannot Import Name EventStateChangedData #133

glbailey opened this issue May 20, 2024 · 0 comments
Labels
bug Something isn't working.

Comments

@glbailey
Copy link

System Health details

System Information

version core-2024.4.3
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.12.2
os_name Linux
os_version 6.6.25-haos
arch x86_64
timezone America/Edmonton
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
GitHub API Calls Remaining 4578
Installed Version 1.34.0
Stage running
Available Repositories 1392
Downloaded Repositories 36
Home Assistant Cloud
logged_in true
subscription_expiration January 14, 2025 at 5:00 PM
relayer_connected true
relayer_region us-east-1
remote_enabled true
remote_connected true
alexa_enabled true
google_enabled false
remote_server us-east-1-10.ui.nabu.casa
certificate_status ready
instance_id fe8583e8d7e546929c040cdec7876469
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Home Assistant OS 12.2
update_channel stable
supervisor_version supervisor-2024.05.1
agent_version 1.6.0
docker_version 25.0.5
disk_total 46.5 GB
disk_used 21.7 GB
healthy true
supported true
board ova
supervisor_api ok
version_api ok
installed_addons Samba share (12.3.1), File editor (5.8.0), Samba Backup (5.2.0), AppDaemon (0.16.5), Mosquitto broker (6.4.0), Glances (0.21.1), Advanced SSH & Web Terminal (17.3.0), Portainer (2023.12.0), Logspout addon (1.6.2), openWakeWord (1.10.0), Piper (1.5.0), Whisper (2.0.0), NGINX Home Assistant SSL proxy (3.9.0)
Dashboards
dashboards 4
resources 24
views 28
mode storage
Recorder
oldest_recorder_run May 16, 2024 at 3:10 AM
current_recorder_run May 19, 2024 at 7:41 PM
estimated_db_size 484.05 MiB
database_engine sqlite
database_version 3.44.2

Checklist

  • I have enabled debug logging for my installation.
  • I have filled out the issue template to the best of my ability.
  • This issue only contains 1 issue (if you have multiple issues, open one issue for each issue).
  • This issue is not a duplicate issue of any previous issues..

Describe the issue

A previously working integration of car_wash now is failing consistently with a system error of:
"Platform error 'binary_sensor' from integration 'car_wash' - cannot import name 'EventStateChangedData' from 'homeassistant.core'"
I have deleted the integration and re-downloaded and re-installed (same version v1.5.7) with the same results. I cannot pinpoint the exact time this started to fail, but likely after an HA update (just a guess). No hardware or other software changes have been made.
This appears to come from line 127 in binary_sensor.py.

Reproduction steps

1.Simply press "Check Configuration" in Developer Tools to see above error message.
2.
3.
...

Debug logs

Logger: homeassistant.config
Source: config.py:1437
First occurred: 9:28:52 AM (1 occurrences)
Last logged: 9:28:52 AM

Platform error: binary_sensor - cannot import name 'EventStateChangedData' from 'homeassistant.core' (/usr/src/homeassistant/homeassistant/core.py)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config.py", line 1437, in _async_load_and_validate_platform_integration
    platform = await p_integration.integration.async_get_platform(domain)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1070, in async_get_platform
    platforms = await self.async_get_platforms((platform_name,))
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1145, in async_get_platforms
    import_future.result()
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1133, in async_get_platforms
    platforms.update(self._load_platforms(platform_names))
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1060, in _load_platforms
    platform_name: self._load_platform(platform_name)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1232, in _load_platform
    cache[full_name] = self._import_platform(platform_name)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1264, in _import_platform
    return importlib.import_module(f"{self.pkg_path}.{platform_name}")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 995, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/config/custom_components/car_wash/binary_sensor.py", line 37, in <module>
    from homeassistant.core import Event, EventStateChangedData, HomeAssistant, callback
ImportError: cannot import name 'EventStateChangedData' from 'homeassistant.core' (/usr/src/homeassistant/homeassistant/core.py)

Diagnostics dump

could not locate this file.

@glbailey glbailey added the bug Something isn't working. label May 20, 2024
@Limych Limych closed this as completed Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working.
Projects
None yet
Development

No branches or pull requests

2 participants