fwestenberg / reolink_dev

Home Assistant Reolink addon
MIT License
553 stars 101 forks source link

Python 3.11 incompatibility #632

Closed LouPaloma closed 1 year ago

LouPaloma commented 1 year ago

Describe the bug Unable to load parts of the systems due to incompatiblity with Python 3.11

To Reproduce Run under 3.11. Same configuration under 3.10 works

Expected behavior System to load

Screenshots None

Environment: Please provide useful information about your environment, like:

Additional context

Stack Trace:

2023-03-04 12:07:27.520 ERROR (MainThread) [homeassistant.loader] Unexpected exception importing platform custom_components.reolink_dev.sensor Traceback (most recent call last): File "/root/miniconda3/envs/hass-py3_11/lib/python3.11/site-packages/homeassistant/loader.py", line 779, in get_platform cache[full_name] = self._import_platform(platform_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/miniconda3/envs/hass-py3_11/lib/python3.11/site-packages/homeassistant/loader.py", line 796, in _import_platform return importlib.import_module(f"{self.pkg_path}.{platform_name}") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/miniconda3/envs/hass-py3_11/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 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 "/opt/homeassistant/custom_components/reolink_dev/sensor.py", line 32, in <module> @asyncio.coroutine ^^^^^^^^^^^^^^^^^ AttributeError: module 'asyncio' has no attribute 'coroutine'

cpainchaud commented 1 year ago

Hi, should be fixed now