Closed vespino closed 1 year ago
His is not an error of the plugin. Your installation is missing something from Python.
Any idea as to what? I have since tried another plugin and that one does work out of the box.
By the strange location of the plugin, any chance you are using Domoticz docker?
Yes I am. No problems before btw.
The plugin is fixed.
Tried it, without success.
Did you do a git pull in the directory of the plugin? Do you have a error?
I did a complete rebuild and all seems to be working now. Thanks!
Updated everything and the plugin stopped working.
This is the error I get in the Domoticz log.
2023-06-06 16:18:35.653 Error: tuya: (tuya) failed to load 'plugin.py', Python Path used was '/home/ton/domoticz/plugins/Domoticz-TUYA-Plugin/:/usr/lib/python39.zip:/usr/lib/python3.9:/usr/lib/python3.9/lib-dynload:/usr/local/lib/python3.9/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.9/dist-packages'. 2023-06-06 16:18:35.656 Error: tuya: Traceback (most recent call last): 2023-06-06 16:18:35.656 Error: tuya: File "/home/ton/domoticz/plugins/Domoticz-TUYA-Plugin/plugin.py", line 65, in
2023-06-06 16:18:35.656 Error: tuya: import tuyaha 2023-06-06 16:18:35.656 Error: tuya: File "/usr/local/lib/python3.9/dist-packages/tuyaha/init.py", line 2, in 2023-06-06 16:18:35.656 Error: tuya: from .tuyaapi import TuyaApi 2023-06-06 16:18:35.656 Error: tuya: File "/usr/local/lib/python3.9/dist-packages/tuyaha/tuyaapi.py", line 4, in 2023-06-06 16:18:35.656 Error: tuya: import requests 2023-06-06 16:18:35.656 Error: tuya: File "/usr/local/lib/python3.9/dist-packages/requests/init.py", line 48, in 2023-06-06 16:18:35.656 Error: tuya: from charset_normalizer import version as charset_normalizer_version 2023-06-06 16:18:35.656 Error: tuya: File "/usr/local/lib/python3.9/dist-packages/charset_normalizer/init.py", line 24, in 2023-06-06 16:18:35.656 Error: tuya: from .api import from_bytes, from_fp, from_path 2023-06-06 16:18:35.656 Error: tuya: File "/usr/local/lib/python3.9/dist-packages/charset_normalizer/api.py", line 5, in 2023-06-06 16:18:35.656 Error: tuya: from .cd import ( 2023-06-06 16:18:35.656 Error: tuya: File "/usr/local/lib/python3.9/dist-packages/charset_normalizer/cd.py", line 9, in 2023-06-06 16:18:35.656 Error: tuya: from .md import is_suspiciously_successive_range 2023-06-06 16:18:35.656 Error: tuya: SystemError: initialization of md__mypyc did not return an extension module Requirement already satisfied: tuyaha in /usr/local/lib/python3.9/dist-packages (0.0.11) Requirement already satisfied: requests in /usr/local/lib/python3.9/dist-packages (2.31.0) Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.9/dist-packages (from requests) (3.1.0) Requirement already satisfied: certifi>=2017.4.17 in /usr/lib/python3/dist-packages (from requests) (2020.6.20) Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/lib/python3/dist-packages (from requests) (1.26.5) Requirement already satisfied: idna<4,>=2.5 in /usr/lib/python3/dist-packages (from requests) (2.10)
The development of Tuyaha has stopped, so I think your requests module is too high. Can you downgrade to 2.23.0?
sudo pip3 install requests==2.23.0
I’m using “pip3 install tuyaha requests“ and currently having no issues.
The development of Tuyaha has stopped, so I think your requests module is too high. Can you downgrade to 2.23.0?
sudo pip3 install requests==2.23.0
great! That was the solution! Thank you
Thank you for reporting back, i will update the instructions.
I have been getting these errors as of lately:
This results in not being able to control Tuya devices.