NickWaterton / Roomba980-Python

Python program and library to control iRobot Roomba 980 Vacuum Cleaner
MIT License
377 stars 106 forks source link

Getting an error when running this on python 3.10 #106

Open blindndangerous opened 2 years ago

blindndangerous commented 2 years ago

I just tried to run this on python 3.10, and get the following error. [2022-04-22 17:20:07,973] INFO Using Password version 2.1
Traceback (most recent call last):
File "/home/stormux/Roomba980-Python/roomba/roomba.py", line 2402, in
main()
File "/home/stormux/Roomba980-Python/roomba/roomba_direct.py", line 405, in main
myroomba = Roomba(addr,
File "/home/stormux/Roomba980-Python/roomba/roomba.py", line 447, in init
self.is_connected = asyncio.Event(loop=self.loop)
File "/usr/lib/python3.10/asyncio/locks.py", line 168, in init
super().init(loop=loop)
File "/usr/lib/python3.10/asyncio/mixins.py", line 17, in init
raise TypeError(
TypeError: As of 3.10, the loop parameter was removed from Event() since it is no longer necessary

NickWaterton commented 2 years ago

Well, as it says, the loop parameter was removed in Python 3.10.

As Python 3.10 didn't exist when the code was written, it's not surprising that there are some incompatibilities.

Solution is to use Python 3.8 for now.

shamitb commented 2 years ago

Worked with Python 3.8

NickWaterton commented 1 year ago

I did fix the code so it works on Python 3.10 now.