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

Doesnt run under python 3.10 #17

Open
hcjehg opened this issue Oct 14, 2022 · 2 comments
Open

Doesnt run under python 3.10 #17

hcjehg opened this issue Oct 14, 2022 · 2 comments

Comments

@hcjehg
Copy link

hcjehg commented Oct 14, 2022

Python 3.10 gives:

(etrv2mqtt) [root@HomeAssistant etrv2mqtt]# ~/venv/etrv2mqtt/bin/python3 -m libetrv.cli scan
Traceback (most recent call last):
File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/root/venv/etrv2mqtt/lib/python3.10/site-packages/libetrv/cli.py", line 3, in
from libetrv.device import eTRVDevice
File "/root/venv/etrv2mqtt/lib/python3.10/site-packages/libetrv/device.py", line 8, in
from .data_struct import BatteryData, SettingsData, TemperatureData, CurrentTimeData, SecretKeyData, NameData
File "/root/venv/etrv2mqtt/lib/python3.10/site-packages/libetrv/data_struct.py", line 3, in
from .properties import eTRVData, eTRVSingleData
File "/root/venv/etrv2mqtt/lib/python3.10/site-packages/libetrv/properties.py", line 5, in
from .utils import etrv_read_data, etrv_write_data
File "/root/venv/etrv2mqtt/lib/python3.10/site-packages/libetrv/utils.py", line 1, in
from collections import Iterable
ImportError: cannot import name 'Iterable' from 'collections' (/usr/lib/python3.10/collections/init.py)

@anx-cbenke
Copy link

anx-cbenke commented Oct 21, 2022

Workaround:
In etrv2mqtt/lib/python3.10/site-packages/libetrv/utils.py change the first line

from collections import Iterable to

from collections.abc import Iterable

@keton
Copy link
Owner

keton commented Oct 25, 2022

this needs to be fixed in libetrv not here.

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

3 participants