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

Setup failed for custom integration 'echonetlite': Unable to import component: No module named 'deprecated' #70

Closed
tom3q opened this issue Feb 9, 2024 · 3 comments

Comments

@tom3q
Copy link
Contributor

tom3q commented Feb 9, 2024

After updating pychonet to 2.6.3 the echonetlite integration fails to load for me with the following exception

Traceback (most recent call last):
  File "/var/lib/homeassistant/lib/python3.11/site-packages/homeassistant/setup.py", line 251, in _async_setup_component
    component = integration.get_component()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/lib/homeassistant/lib/python3.11/site-packages/homeassistant/loader.py", line 827, in get_component
    ComponentProtocol, importlib.import_module(self.pkg_path)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/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 "/home/homeassistant/.homeassistant/custom_components/echonetlite/__init__.py", line 5, in <module>
    import pychonet as echonet
  File "/var/lib/homeassistant/lib/python3.11/site-packages/pychonet/__init__.py", line 6, in <module>
    from .ElectricBlind import ElectricBlind
  File "/var/lib/homeassistant/lib/python3.11/site-packages/pychonet/ElectricBlind.py", line 1, in <module>
    from deprecated import deprecated
ModuleNotFoundError: No module named 'deprecated'

It looks like the import in question was added by 9d6b794

Any idea how to fix this? Thanks in advance!

@tom3q
Copy link
Contributor Author

tom3q commented Feb 9, 2024

Running pip install Deprecated seems to have fixed it. Does the Deprecated module need to be somehow added as a dependency so that it can be installed automatically?

@nao-pon
Copy link
Collaborator

nao-pon commented Feb 10, 2024

@tom3q Thank you for letting me know! I set it as a dependent module.

@tom3q
Copy link
Contributor Author

tom3q commented Feb 12, 2024

Thanks for the quick fix again!

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