Roomba980-Python icon indicating copy to clipboard operation
Roomba980-Python copied to clipboard

Getting an error when running this on python 3.10

Open blindndangerous opened this issue 2 years ago • 3 comments

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

blindndangerous avatar Apr 22 '22 23:04 blindndangerous

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.

NickWaterton avatar Apr 22 '22 23:04 NickWaterton

Worked with Python 3.8

shamitb avatar Sep 07 '22 20:09 shamitb