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

Breaking change in latest HA: aionotify not compatible with python 3.11 #67

Open
Zynth-dev opened this issue Jun 18, 2023 · 1 comment

Comments

@Zynth-dev
Copy link

Zynth-dev commented Jun 18, 2023

Latest HA upgrades to python 3.11 which is incompatible with aionotify.
Another issue with the same rootcause that occurred (for reference) is this:
home-assistant/core#94215

Error:
Traceback (most recent call last): 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/variable/__init__.py", line 111, in <module> class Variable(RestoreEntity): File "/config/custom_components/variable/__init__.py", line 158, in Variable @asyncio.coroutine ^^^^^^^^^^^^^^^^^ AttributeError: module 'asyncio' has no attribute 'coroutine'

Unfortunatey I don't have the skill to fix this.
I have removed the "@asyncio.coroutine" lines, and replaced them with a "async def", but that does not solve the issue.
It leads to this, which I don't know how to solve.
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "/config/custom_components/variable/__init__.py", line 100 yield from asyncio.wait(tasks) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: 'yield from' inside async function

@Zynth-dev
Copy link
Author

Zynth-dev commented Jun 18, 2023

Update: Solved by moving to the "improved" version of variables:
https://github.com/Wibias/hass-variables

Only delta in your *.yaml apparently is to update "variable.variablename" to "sensor.variablename".
(Don't update "variable.set_variable", just leave that as is!)
It worked for me.

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

1 participant