Page 1 of 1

Python errors with both BuienRadar and ToonApiLib plugins

Posted: Monday 29 July 2019 22:41
by RduPre
Hi,

See the error I get in the error log.

Buienradar was working but after I installed the ToonApiLib plugin these error started.

Any help is more than welcome.

Code: Select all

2019-07-29 22:35:10.182 Error: (Buienradar) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/domoticz-buienradar/:/usr/lib/python35.zip:/usr/lib/python3.5:/usr/lib/python3.5/plat-arm-linux-gnueabihf:/usr/lib/python3.5/lib-dynload:/usr/local/lib/python3.5/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.5/dist-packages'.
2019-07-29 22:35:10.182 Error: (Buienradar) Module Import failed, exception: 'ImportError'
2019-07-29 22:35:10.182 Error: (Buienradar) Module Import failed: ' Name: requests'
2019-07-29 22:35:10.182 Error: (Buienradar) Error Line details not available.
2019-07-29 22:35:10.422 Error: (ToonApiLib) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/toonapilib4domoticz/:/usr/lib/python35.zip:/usr/lib/python3.5:/usr/lib/python3.5/plat-arm-linux-gnueabihf:/usr/lib/python3.5/lib-dynload:/usr/local/lib/python3.5/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.5/dist-packages'.
2019-07-29 22:35:10.422 Error: (Toon Thermostaat) Module Import failed, exception: 'ImportError'
2019-07-29 22:35:10.422 Error: (Toon Thermostaat) Module Import failed: ' Name: toonapilib'
2019-07-29 22:35:10.422 Error: (Toon Thermostaat) Error Line details not available.
2019-07-29 22:36:13.300 Error: Buienradar hardware (15) thread seems to have ended unexpectedly
2019-07-29 22:36:13.300 Error: Toon Thermostaat hardware (18) thread seems to have ended unexpectedly
2019-07-29 22:36:27.308 Error: Buienradar hardware (15) thread seems to have ended unexpectedly
2019-07-29 22:36:27.309 Error: Toon Thermostaat hardware (18) thread seems to have ended unexpectedly
2019-07-29 22:36:41.313 Error: Buienradar hardware (15) thread seems to have ended unexpectedly
2019-07-29 22:36:41.313 Error: Toon Thermostaat hardware (18) thread seems to have ended unexpectedly
2019-07-29 22:36:55.315 Error: Buienradar hardware (15) thread seems to have ended unexpectedly
2019-07-29 22:36:55.316 Error: Toon Thermostaat hardware (18) thread seems to have ended unexpectedly
2019-07-29 22:37:09.318 Error: Buienradar hardware (15) thread seems to have ended unexpectedly
2019-07-29 22:37:09.319 Error: Toon Thermostaat hardware (18) thread seems to have ended unexpectedly
2019-07-29 22:37:23.322 Error: Buienradar hardware (15) thread seems to have ended unexpectedly
2019-07-29 22:37:23.322 Error: Toon Thermostaat hardware (18) thread seems to have ended unexpectedly
2019-07-29 22:37:37.325 Error: Buienradar hardware (15) thread seems to have ended unexpectedly

Re: Python errors with both BuienRadar and ToonApiLib plugins

Posted: Monday 29 July 2019 23:25
by Dnpwwo
@RduPre,

The Buienradar plugin now has an issue with the 'requests' library which means that when you installed 'toonapilib' pip may have updated 'requests' to a version that is incompatible.

Have you tried going into Python at the command line and importing requests to check it is valid?

Re: Python errors with both BuienRadar and ToonApiLib plugins

Posted: Tuesday 30 July 2019 13:05
by RduPre
Dnpwwo wrote: Monday 29 July 2019 23:25 @RduPre,

The Buienradar plugin now has an issue with the 'requests' library which means that when you installed 'toonapilib' pip may have updated 'requests' to a version that is incompatible.

Have you tried going into Python at the command line and importing requests to check it is valid?
I don't know how to do this, I have the feeling that there is sometime wrong with Python or Pip itself

Re: Python errors with both BuienRadar and ToonApiLib plugins

Posted: Tuesday 30 July 2019 13:29
by Snowtiger
RduPre wrote:
Dnpwwo wrote: Monday 29 July 2019 23:25 @RduPre,

The Buienradar plugin now has an issue with the 'requests' library which means that when you installed 'toonapilib' pip may have updated 'requests' to a version that is incompatible.

Have you tried going into Python at the command line and importing requests to check it is valid?
I don't know how to do this, I have the feeling that there is sometime wrong with Python or Pip itself
Go into a Linux Terminal
- type python
- a >> prompt will appear
- type import requests

Now check if it does not throw you an error.

- type exit() or <ctrl> D = this exits the Python session

Re: Python errors with both BuienRadar and ToonApiLib plugins

Posted: Tuesday 30 July 2019 19:44
by RduPre
I get these errors when I type phyton

:~ $ python
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
ImportError: No module named site

Re: Python errors with both BuienRadar and ToonApiLib plugins

Posted: Tuesday 30 July 2019 23:16
by Dnpwwo
@RduPre,

Doesn't look good :(

Can you try 'python3' '? That might work

Re: Python errors with both BuienRadar and ToonApiLib plugins

Posted: Tuesday 30 July 2019 23:18
by RduPre
Dnpwwo wrote: Tuesday 30 July 2019 23:16 @RduPre,

Doesn't look good :(

Can you try 'python3' '? That might work
Python 3.5.3 (default, Sep 27 2018, 17:25:39)
[GCC 6.3.0 20170516] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'requests'
>>>

Re: Python errors with both BuienRadar and ToonApiLib plugins

Posted: Tuesday 30 July 2019 23:50
by Dnpwwo
@RduPre,

You could try

Code: Select all

sudo pip3 install requests

Re: Python errors with both BuienRadar and ToonApiLib plugins

Posted: Wednesday 31 July 2019 16:58
by RduPre
Dnpwwo wrote: Tuesday 30 July 2019 23:50 @RduPre,

You could try

Code: Select all

sudo pip3 install requests
I did that, but error remains the same.

Re: Python errors with both BuienRadar and ToonApiLib plugins

Posted: Wednesday 31 July 2019 18:06
by eenernl
It looks like the last update to beta 4.11062 causes the problem. Since last July the 29th I have the same problems with ToonApiLib and Buienradar.

[attachment=0]2E055CDB-CCAF-45C7-A076-FDB3C37EA4FA.jpeg[/attachment]
Electric usage last 3 days