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

Compatibility with Pillow >= 10.0.0 (roomba directory) #9

Open
marillat opened this issue Nov 9, 2024 · 6 comments
Open

Compatibility with Pillow >= 10.0.0 (roomba directory) #9

marillat opened this issue Nov 9, 2024 · 6 comments

Comments

@marillat
Copy link

marillat commented Nov 9, 2024

I noticed this PR NickWaterton/Roomba980-Python#120
as the current roomba directory display

  File "/opt/domoticz/plugins/Roomba/roomba/roomba.py", line 206, in create_icon
    icon = self.base_icon.copy().resize(size,Image.ANTIALIAS)
                                             ^^^^^^^^^^^^^^^
AttributeError: module 'PIL.Image' has no attribute 'ANTIALIAS'

@marillat marillat changed the title Compatibility with Pillow (roomba directory) Compatibility with Pillow >= 10.0.0 (roomba directory) Nov 9, 2024
@marillat
Copy link
Author

marillat commented Nov 9, 2024

After I applied PR NickWaterton/Roomba980-Python#120
I see

systemd[1]: Started roomba.service - Roomba mqtt client.
python3[231821]: Traceback (most recent call last):
python3[231821]:   File "<frozen runpy>", line 198, in _run_module_as_main
python3[231821]:   File "<frozen runpy>", line 88, in _run_code
python3[231821]:   File "/opt/domoticz/plugins/Roomba/roomba/__main__.py", line 4, in <module>
python3[231821]:     main()
python3[231821]:   File "/opt/domoticz/plugins/Roomba/roomba/roomba_direct.py", line 406, in main
python3[231821]:     myroomba =  Roomba(addr,
python3[231821]:                 ^^^^^^^^^^^^
python3[231821]:   File "/opt/domoticz/plugins/Roomba/roomba/roomba.py", line 454, in __init__
python3[231821]:     self.is_connected = asyncio.Event(loop=self.loop)
python3[231821]:                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
python3[231821]: TypeError: Event.__init__() got an unexpected keyword argument 'loop'
python3[231821]: CV or numpy module not found, falling back to PIL
python3[231821]: CV or numpy module not found, falling back to PIL

@FilipDem
Copy link
Owner

FilipDem commented Nov 9, 2024

I already had a more recent version of my implementation running locally... I updated GitHub with this version.
This one is using LANCZOS...
I didn't investigating in detail, but I assume this will do the trick...

@marillat
Copy link
Author

Thanks @FilipDem

This plugin (or Nick' code) is supposed to be compatible with paho.mqtt 2 ?

@marillat
Copy link
Author

I confirm doesn't work with paho.mqtt 2.0.0

@FilipDem
Copy link
Owner

I am using paho.mqtt 2.1.0.

pi@Domoticz:~ $ sudo pip3 show paho.mqtt
Name: paho-mqtt
Version: 2.1.0
Summary: MQTT version 5.0/3.1.1 client class
Home-page: None
Author: None
Author-email: Roger Light roger@atchoo.org
License: EPL-2.0 OR BSD-3-Clause
Location: /usr/local/lib/python3.9/dist-packages

@marillat
Copy link
Author

I'm under Debian unstable amd64 python 3.12.7 and we only have python3-paho-mqtt 2.0.0 installed apt-get
Not really a problem as we have 1.6.1 in stable.

I've another question. The roomba service is supposed to only work if mosquito is configured with allow_anonymous true ?

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

2 participants