Error starting weconnect-mqtt
KingKoerle opened this issue · 2 comments
Hello,
I'm having problems using weconnect-mqtt.
My machine:
`###############################################################################
############### openhabian ##################################################
###############################################################################
Ip = 192.168.0.99
Release = Raspbian GNU/Linux 11 (bullseye)
Kernel = Linux 6.1.21-v8+
Platform = Raspberry Pi 4 Model B Rev 1.5
Uptime = 0 day(s). 0:0:49
CPU Usage = 37.56% avg over 4 cpu(s) (4 core(s) x 1 socket(s))
CPU Load = 1m: 2.13, 5m: 0.64, 15m: 0.22
Memory = Free: 0.71GB (38%), Used: 1.14GB (62%), Total: 1.85GB
Swap = Free: 2.99GB (100%), Used: 0.00GB (0%), Total: 2.99GB
Root = Free: 20.57GB (74%), Used: 7.18GB (26%), Total: 28.97GB
Updates = 0 apt updates available.
Sessions = 1 session(s)
Processes = 155 running processes of 32768 maximum processes
###############################################################################`
openhabian@openhabian:~ $ pip3 -V pip 20.3.4 from /usr/lib/python3/dist-packages/pip (python 3.9)
First I installed WeConnect-python:
openhabian@openhabian:~ $ pip3 install weconnect[Images] Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting weconnect[Images] Using cached weconnect-0.59.1-py3-none-any.whl (162 kB) Requirement already satisfied: oauthlib~=3.2.2 in ./.local/lib/python3.9/site-packages (from weconnect[Images]) (3.2.2) Requirement already satisfied: requests~=2.31.0 in ./.local/lib/python3.9/site-packages (from weconnect[Images]) (2.31.0) Requirement already satisfied: ascii-magic~=2.3.0 in ./.local/lib/python3.9/site-packages (from weconnect[Images]) (2.3.0) Requirement already satisfied: pillow~=10.1.0 in ./.local/lib/python3.9/site-packages (from weconnect[Images]) (10.1.0) Requirement already satisfied: colorama in ./.local/lib/python3.9/site-packages (from ascii-magic~=2.3.0->weconnect[Images]) (0.4.6) Requirement already satisfied: certifi>=2017.4.17 in /usr/lib/python3/dist-packages (from requests~=2.31.0->weconnect[Images]) (2020.6.20) Requirement already satisfied: charset-normalizer<4,>=2 in ./.local/lib/python3.9/site-packages (from requests~=2.31.0->weconnect[Images]) (3.3.0) Requirement already satisfied: idna<4,>=2.5 in /usr/lib/python3/dist-packages (from requests~=2.31.0->weconnect[Images]) (2.10) Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/lib/python3/dist-packages (from requests~=2.31.0->weconnect[Images]) (1.26.5) Installing collected packages: weconnect Successfully installed weconnect-0.59.1
then I installed weconnect-mqtt
openhabian@openhabian:~ $ pip3 install weconnect-mqtt Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting weconnect-mqtt Using cached weconnect_mqtt-0.47.0-py3-none-any.whl (15 kB) Requirement already satisfied: paho-mqtt~=1.6.1 in ./.local/lib/python3.9/site-packages (from weconnect-mqtt) (1.6.1) Requirement already satisfied: weconnect[images]~=0.59.1 in ./.local/lib/python3.9/site-packages (from weconnect-mqtt) (0.59.1) Requirement already satisfied: python-dateutil~=2.8.2 in ./.local/lib/python3.9/site-packages (from weconnect-mqtt) (2.8.2) Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil~=2.8.2->weconnect-mqtt) (1.16.0) Requirement already satisfied: oauthlib~=3.2.2 in ./.local/lib/python3.9/site-packages (from weconnect[images]~=0.59.1->weconnect-mqtt) (3.2.2) Requirement already satisfied: requests~=2.31.0 in ./.local/lib/python3.9/site-packages (from weconnect[images]~=0.59.1->weconnect-mqtt) (2.31.0) Requirement already satisfied: pillow~=10.1.0 in ./.local/lib/python3.9/site-packages (from weconnect[images]~=0.59.1->weconnect-mqtt) (10.1.0) Requirement already satisfied: ascii-magic~=2.3.0 in ./.local/lib/python3.9/site-packages (from weconnect[images]~=0.59.1->weconnect-mqtt) (2.3.0) Requirement already satisfied: colorama in ./.local/lib/python3.9/site-packages (from ascii-magic~=2.3.0->weconnect[images]~=0.59.1->weconnect-mqtt) (0.4.6) Requirement already satisfied: idna<4,>=2.5 in /usr/lib/python3/dist-packages (from requests~=2.31.0->weconnect[images]~=0.59.1->weconnect-mqtt) (2.10) Requirement already satisfied: certifi>=2017.4.17 in /usr/lib/python3/dist-packages (from requests~=2.31.0->weconnect[images]~=0.59.1->weconnect-mqtt) (2020.6.20) Requirement already satisfied: charset-normalizer<4,>=2 in ./.local/lib/python3.9/site-packages (from requests~=2.31.0->weconnect[images]~=0.59.1->weconnect-mqtt) (3.3.0) Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/lib/python3/dist-packages (from requests~=2.31.0->weconnect[images]~=0.59.1->weconnect-mqtt) (1.26.5) Installing collected packages: weconnect-mqtt Successfully installed weconnect-mqtt-0.47.0
When I start weconnect-mqtt I get the following error:
openhabian@openhabian:~ $ weconnect-mqtt Traceback (most recent call last): File "/home/openhabian/.local/bin/weconnect-mqtt", line 5, in <module> from weconnect_mqtt.weconnect_mqtt_base import main File "/home/openhabian/.local/lib/python3.9/site-packages/weconnect_mqtt/weconnect_mqtt_base.py", line 19, in <module> from PIL import Image File "/home/openhabian/.local/lib/python3.9/site-packages/PIL/Image.py", line 82, in <module> from . import _imaging as core ImportError: libopenjp2.so.7: cannot open shared object file: No such file or directory
Did I something wrong?
Regards Stefan
I think your system is missing the library to work with jpeg images. Try something like:
sudo apt-get install libopenjp2-7
That was too easy - thanks a lot.
Great work (y)