Skip to content

Import failed for pyscript - breaks with 2023.8 beta #501

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

Closed
VDRainer opened this issue Jul 28, 2023 · 4 comments
Closed

Import failed for pyscript - breaks with 2023.8 beta #501

VDRainer opened this issue Jul 28, 2023 · 4 comments

Comments

@VDRainer
Copy link

This error originated from a custom integration.

Logger: homeassistant.setup
Source: custom_components/pyscript/__init__.py:27
Integration: pyscript (documentation, issues)
First occurred: 7:35:33 AM (1 occurrences)
Last logged: 7:35:33 AM

Setup failed for custom integration pyscript: Unable to import component: cannot import name 'Event' from 'homeassistant.helpers.event' (/usr/src/homeassistant/homeassistant/helpers/event.py)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 215, in _async_setup_component
    component = integration.get_component()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 813, in get_component
    ComponentProtocol, importlib.import_module(self.pkg_path)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/config/custom_components/pyscript/__init__.py", line 27, in <module>
    from homeassistant.helpers.event import Event as HAEvent
ImportError: cannot import name 'Event' from 'homeassistant.helpers.event' (/usr/src/homeassistant/homeassistant/helpers/event.py)

@craigbarratt
Copy link
Member

See PR #500 for a fix.

@VDRainer
Copy link
Author

Thank you!

@craigbarratt
Copy link
Member

Reopen so other people can more easily find this issue.

@craigbarratt craigbarratt reopened this Jul 28, 2023
@craigbarratt craigbarratt changed the title Setup failed for custom integration pyscript - 2023.8 beta Import failed for pyscript - breaks with 2023.8 beta Jul 28, 2023
@craigbarratt
Copy link
Member

Fixed in 1.5.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants