r-renato / ha-climacell-weather

Climacell weather provider integration is a custom component for Home Assistant. The climacell platform uses the Climacell API as a source for meteorological data for your location.
MIT License
46 stars 10 forks source link

AttributeError: module 'asyncio' has no attribute 'coroutine' #73

Open the0ckid82 opened 1 year ago

the0ckid82 commented 1 year ago

after latest ha update integration now fails, im guessing that this has to do with the python upgrade

Logger: homeassistant.loader
Source: custom_components/climacell_custom/__init__.py:16
Integration: climacell_custom ([documentation](https://gitlab.com/rrenato/ha-climacell-weather))
First occurred: 3:55:16 PM (1 occurrences)
Last logged: 3:55:16 PM

Unexpected exception importing platform custom_components.climacell_custom.sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/loader.py", line 833, in get_platform
    cache[full_name] = self._import_platform(platform_name)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 850, in _import_platform
    return importlib.import_module(f"{self.pkg_path}.{platform_name}")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  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 1206, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1128, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1149, 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/climacell_custom/__init__.py", line 16, in <module>
    @asyncio.coroutine
     ^^^^^^^^^^^^^^^^^
AttributeError: module 'asyncio' has no attribute 'coroutine'

Home Assistant 2023.6.0 Supervisor 2023.06.1 Operating System 10.2 Frontend 20230607.0 - latest

tarheelz commented 1 year ago

Same. Might have to drop back to 2023.5 until this gets sorted out.

the0ckid82 commented 1 year ago

75 submitted, if you want to fix it yourself just make sure remove the .pyc files and restart HA

tarheelz commented 1 year ago

75 submitted, if you want to fix it yourself just make sure remove the .pyc files and restart HA

That worked. Thanks!

the0ckid82 commented 1 year ago

75 submitted, if you want to fix it yourself just make sure remove the .pyc files and restart HA

That worked. Thanks!

no problem