dnpwwo / Domoticz-Google-Plugin

MIT License
40 stars 10 forks source link

The plugin doesn't work after update to domoticz 2020.2 #18

Closed mooky31 closed 4 years ago

mooky31 commented 4 years ago

Hi,

Everything was running fine with domoticz 2020.1 Since I updated to 2020.2, I have these error messages :

2020-04-29 14:49:41.733 Error: (GoogleDevs) failed to load 'plugin.py', Python Path used was '/home/domoticz/domoticz/plugins/Domoticz-Google-Plugin/:/usr/lib/python37.zip:/usr/lib/python3.7:/usr/lib/python3.7/lib-dynload:/usr/local/lib/python3.7/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.7/dist-packages'.
2020-04-29 14:49:41.733 Error: (GoogleDevices) Module Import failed, exception: 'ModuleNotFoundError'
2020-04-29 14:49:41.733 Error: (GoogleDevices) Module Import failed: ' Name: idna'
2020-04-29 14:49:41.733 Error: (GoogleDevices) Error Line details not available.
2020-04-29 14:49:15.975 Error: GoogleDevices hardware (11) thread seems to have ended unexpectedly

The readme says to check for files in domoticz/plugins, but what should I do If it doesn't ?

domoticz@domoticzpi:~/domoticz/plugins $ ls -lR
.:
total 16
drwxr-x--- 3 domoticz domoticz 4096 avril  2 10:06 AwoxSMP
drwxr-xr-x 4 domoticz domoticz 4096 avril 29 14:44 Domoticz-Google-Plugin
drwxr-x--- 2 domoticz domoticz 4096 avril  2 10:06 examples
drwxr-xr-x 4 domoticz domoticz 4096 déc.  28 23:36 pp-manager

./AwoxSMP:
total 12
drwxr-x--- 2 domoticz domoticz 4096 avril  2 10:06 lib
-rw-r----- 1 domoticz domoticz 7982 avril  2 10:06 plugin.py

./AwoxSMP/lib:
total 8
-rw-r----- 1 domoticz domoticz    0 avril  2 10:06 __init__.py
-rw-r----- 1 domoticz domoticz 4176 avril  2 10:06 pySmartPlugSmpB16.py

./Domoticz-Google-Plugin:
total 80
-rw-r--r-- 1 domoticz domoticz  8052 avril 29 14:43 ChromecastUltra.zip
-rw-r--r-- 1 domoticz domoticz  6828 avril 29 14:43 GoogleHomeMini.zip
-rw-r--r-- 1 domoticz domoticz  1075 avril 29 14:43 LICENSE
-rw-r--r-- 1 domoticz domoticz 45455 avril 29 14:43 plugin.py
drwxr-x--- 2 domoticz domoticz  4096 avril 29 14:44 __pycache__
-rw-r--r-- 1 domoticz domoticz  5301 avril 29 14:43 README.md

./Domoticz-Google-Plugin/__pycache__:
total 32
-rw-r----- 1 domoticz domoticz 30136 avril 29 14:44 plugin.cpython-37.pyc

./examples:
total 156
-rw-r----- 1 domoticz domoticz  3247 avril  2 10:06  BaseTemplate.py
-rw-r----- 1 domoticz domoticz 23003 avril  2 10:06  DenonMarantz.py
-rw-r----- 1 domoticz domoticz 15436 avril  2 10:06 'Dlink DSP-W215.py'
-rw-r----- 1 domoticz domoticz  6561 avril  2 10:06 'HTTP Listener.py'
-rw-r----- 1 domoticz domoticz  8304 avril  2 10:06  HTTP.py
-rw-r----- 1 domoticz domoticz 34599 avril  2 10:06  Kodi.py
-rw-r----- 1 domoticz domoticz  5977 avril  2 10:06 'MQTT Publish.py'
-rw-r----- 1 domoticz domoticz  5764 avril  2 10:06 'MQTT Subscribe.py'
-rw-r----- 1 domoticz domoticz  4357 avril  2 10:06  Mutli-Threaded.py
-rw-r----- 1 domoticz domoticz  9165 avril  2 10:06  Pinger.py
-rw-r----- 1 domoticz domoticz 11318 avril  2 10:06  RAVEn.py
-rw-r----- 1 domoticz domoticz  4513 avril  2 10:06 'UDP Discovery.py'

./pp-manager:
total 96
-rw-r--r-- 1 domoticz domoticz    71 déc.  28 23:35 CONTRIBUTING.md
-rw-r--r-- 1 domoticz domoticz   756 déc.  28 23:35 exceptions.orig
-rw-r--r-- 1 domoticz domoticz 35147 déc.  28 23:35 LICENSE
-rwxr-xr-x 1 domoticz domoticz 39195 déc.  28 23:35 plugin.py
drwxr-x--- 2 domoticz domoticz  4096 déc.  28 23:36 __pycache__
-rw-r--r-- 1 domoticz domoticz  2194 déc.  28 23:35 README.md
-rw-r--r-- 1 domoticz domoticz   247 déc.  28 23:35 secpoluser.orig

./pp-manager/__pycache__:
total 24
-rw-r----- 1 domoticz domoticz 24517 déc.  28 23:36 plugin.cpython-35.pyc

By the way, plugin.py is in the python path stated by the error message.

mooky31 commented 4 years ago

I can reply to myself : I ran pip3 again, it installed idna and solved the problem.

root@domoticzpi:~# pip3 install pychromecast
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: pychromecast in /usr/local/lib/python3.7/dist-packages (4.2.0)
Requirement already satisfied: zeroconf>=0.24.4 in /usr/local/lib/python3.7/dist-packages (from pychromecast) (0.24.5)
Requirement already satisfied: requests>=2.0 in /usr/local/lib/python3.7/dist-packages (from pychromecast) (2.23.0)
Requirement already satisfied: protobuf>=3.0.0 in /usr/local/lib/python3.7/dist-packages (from pychromecast) (3.11.3)
Requirement already satisfied: casttube>=0.2.0 in /usr/local/lib/python3.7/dist-packages (from pychromecast) (0.2.0)
Requirement already satisfied: ifaddr in /usr/local/lib/python3.7/dist-packages (from zeroconf>=0.24.4->pychromecast) (0.1.6)
Collecting idna<3,>=2.5 (from requests>=2.0->pychromecast)
  Downloading https://files.pythonhosted.org/packages/89/e3/afebe61c546d18fb1709a61bee788254b40e736cff7271c7de5de2dc4128/idna-2.9-py2.py3-none-any.whl (58kB)
    100% |████████████████████████████████| 61kB 511kB/s
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.7/dist-packages (from requests>=2.0->pychromecast) (1.25.8)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.7/dist-packages (from requests>=2.0->pychromecast) (2019.11.28)
Requirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.7/dist-packages (from requests>=2.0->pychromecast) (3.0.4)
Requirement already satisfied: six>=1.9 in /usr/lib/python3/dist-packages (from protobuf>=3.0.0->pychromecast) (1.12.0)
Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from protobuf>=3.0.0->pychromecast) (40.8.0)
Installing collected packages: idna
Successfully installed idna-2.9
root@domoticzpi:~# pip3 install gtts
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: gtts in /usr/local/lib/python3.7/dist-packages (2.1.1)
Requirement already satisfied: click in /usr/local/lib/python3.7/dist-packages (from gtts) (7.1.1)
Requirement already satisfied: beautifulsoup4 in /usr/local/lib/python3.7/dist-packages (from gtts) (4.8.2)
Requirement already satisfied: gtts-token>=1.1.3 in /usr/local/lib/python3.7/dist-packages (from gtts) (1.1.3)
Requirement already satisfied: requests in /usr/local/lib/python3.7/dist-packages (from gtts) (2.23.0)
Requirement already satisfied: six in /usr/lib/python3/dist-packages (from gtts) (1.12.0)
Requirement already satisfied: soupsieve>=1.2 in /usr/local/lib/python3.7/dist-packages (from beautifulsoup4->gtts) (2.0)
Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.7/dist-packages (from requests->gtts) (2.9)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.7/dist-packages (from requests->gtts) (1.25.8)
Requirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.7/dist-packages (from requests->gtts) (3.0.4)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.7/dist-packages (from requests->gtts) (2019.11.28)