Search found 14 matches

by lambertmular
Tuesday 24 January 2023 17:37
Forum: Python
Topic: python code suddenly not working
Replies: 37
Views: 3782

Re: python code suddenly not working

I must say it is not completely working. For example without the global statement it seems that some variable inside "def" are not updated as you can see in this code import DomoticzEvents as DE import datetime,time time1=datetime.datetime.now() # heure actuelle DE.Log("Python script1: time1"+str ...
by lambertmular
Tuesday 24 January 2023 16:49
Forum: Python
Topic: python code suddenly not working
Replies: 37
Views: 3782

Re: python code suddenly not working

Many many thanks willemd. As I told in a previous post, my actual code is very long and complex, however after treating almost all variables with your recipe: using "global" each time they throw me an error, I managed to make my code work again! Great great job, I can't thank you enough! I must say ...
by lambertmular
Tuesday 24 January 2023 14:56
Forum: Python
Topic: python code suddenly not working
Replies: 37
Views: 3782

Re: python code suddenly not working

Thank you for your help waltervl! below I answer your questions and report another bug that also seems related to "def What happens if you change this def data_meteo(name): return list(map(float,re.findall("(\d+\.?\d+);(\d+);(\d+)",DE.Devices[name].s_value)[0])) Into this def data_meteo(name ...
by lambertmular
Sunday 22 January 2023 22:19
Forum: Python
Topic: python code suddenly not working
Replies: 37
Views: 3782

Re: python code suddenly not working

Did you raise it as an issue on Github yet? As advised, I raised my problem as an issue on github. Nevertheless the issue was closed 50 min after being opened, with the only response Please use the forum Is he referring to this forum or does it exists a forum on github? (sorry for the stupid ...
by lambertmular
Saturday 21 January 2023 23:33
Forum: Python
Topic: python code suddenly not working
Replies: 37
Views: 3782

Re: python code suddenly not working

Did you raise it as an issue on Github yet?
No, I did not know it was the next step in the process. Thanks.
However I am not sure how to do it, any advise? I will try tomorrow
by lambertmular
Saturday 21 January 2023 20:39
Forum: Python
Topic: python code suddenly not working
Replies: 37
Views: 3782

Re: python code suddenly not working

Since the cause is not clear, I would take a new SD card, re-install everything, copy the dbase and scripts and see whether it is solved ... I did as you suggest: I took a different card, I installed "pi-lite", I installed domoticz, I installed python on the pi and when testing the same code as in ...
by lambertmular
Thursday 12 January 2023 9:43
Forum: Python
Topic: python code suddenly not working
Replies: 37
Views: 3782

Re: python code suddenly not working

Could you solve it using this command? sudo pip3 install requests it seems you miss this module. It seems that I already have it installed pi@raspberrypi:~ $ sudo pip3 install requests Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Requirement already satisfied ...
by lambertmular
Tuesday 10 January 2023 22:47
Forum: Python
Topic: python code suddenly not working
Replies: 37
Views: 3782

Re: python code suddenly not working

Any news? any help? I really need my code, it controls everything in my house and avoid the circuit breaker to trip.
Many thanks
by lambertmular
Monday 09 January 2023 15:06
Forum: Python
Topic: python code suddenly not working
Replies: 37
Views: 3782

Re: python code suddenly not working

I assume it was for a reason .....? I cannot remember making a connection this day. I initially thought it was the raspberry pi update but we saw that is was not on the same day. So I don't know The only thing I can imagine is that I inadvertently updated my version of domoticz. I was avoiding the ...
by lambertmular
Monday 09 January 2023 10:57
Forum: Python
Topic: python code suddenly not working
Replies: 37
Views: 3782

Re: python code suddenly not working

When did it stop working and what happened shortly before it? Can you find it in the logfile? Maybe related to an upgrade? Yes I have the logfile and know when it stopped working. I copy the log file below: 2023-01-07 13:31:43.283 RFLink: Temp + Humidity (Temp Chambre) 2023-01-07 13:31:43.313 ...
by lambertmular
Sunday 08 January 2023 22:54
Forum: Python
Topic: python code suddenly not working
Replies: 37
Views: 3782

Re: python code suddenly not working

To check if the problem comes from python I also try to run the same code directly with python3.7 on my rapsberry. I ran the following code on my raspberry using python3.7 import re es=re.findall("(\d+\.?\d+);(\d+);(\d+)","18.4;75;3") print(es) def ret(dev): return re.findall("(\d+\.?\d+);(\d+);(\d ...
by lambertmular
Sunday 08 January 2023 21:24
Forum: Python
Topic: python code suddenly not working
Replies: 37
Views: 3782

Re: python code suddenly not working

What is the python version Domoticz is using? You see that in menu setup - about. Or at startup in the logging of Domoticz...
That's "Python Version: 3.7.3 (default, Oct 31 2022, 14:04:00) [GCC 8.3.0]"
by lambertmular
Sunday 08 January 2023 17:18
Forum: Python
Topic: python code suddenly not working
Replies: 37
Views: 3782

Re: python code suddenly not working

What is menu setup - about saying about python? I am sorry I do not get it, what do you mean exactly? The error is about module "re" (regex expressions) wich i think is a standard installed module so not sure what is going on... Yes, you are right, the error is about the module "re". But please ...
by lambertmular
Sunday 08 January 2023 16:31
Forum: Python
Topic: python code suddenly not working
Replies: 37
Views: 3782

python code suddenly not working

Today I noticed that my python script on domoticz was not running anymore with no obvious reason (I have not touch it for a while). After trying to understand the problem I noticed that even a very simple code is not working at all import DomoticzEvents as DE import re es=list(map(float,re.findall ...