Python scripts don't run since upgrading to v2025.1 Topic is solved

Please use template to report bugs and problems. Post here your questions when not sure where else to post
Only for bugs in the Domoticz application! other problems go in different subforums!

Moderators: leecollings, remb0

Forum rules
Before posting here, make sure you are on the latest Beta or Stable version.
If you have problems related to the web gui, clear your browser cache + appcache first.

Use the following template when posting here:

Version: xxxx
Platform: xxxx
Plugin/Hardware: xxxx
Description:
.....

If you are having problems with scripts/blockly, always post the script (in a spoiler or code tag) or screenshots of your blockly

If you are replying, please do not quote images/code from the first post

Please mark your topic as Solved when the problem is solved.
Post Reply
StratosHF
Posts: 14
Joined: Sunday 18 September 2016 18:33
Target OS: Raspberry Pi / ODroid
Domoticz version: 2025.1
Location: Oxford
Contact:

Python scripts don't run since upgrading to v2025.1

Post by StratosHF »

Hi,

I upgraded from v2024.7 to v2025.1 last night. The upgrade (via the gui) went ok but this morning a few of my tasks didn't run as expected. Looking at the logs I see its related to Python scripts....

Code: Select all

2025-05-06 06:10:02.467 Error: Error executing script command (/home/pi/BedroomLED.py). returned: 256
2025-05-06 06:11:01.483 Error: Error executing script command (/home/pi/FrostWarning.py). returned: 256
2025-05-06 06:20:01.784 Error: Error executing script command (/home/pi/LampsAM.py). returned: 256
As an example the scripts are typically called via an on action...

Code: Select all

script:///home/pi/FrostWarning.py.
Looking at History.txt, there isn't any obvious changes which would cause a problem. The logs from the restart do state...

Code: Select all

2025-05-05 17:47:24.315 Status: PluginSystem: Started, Python version '3.7.3', 1 plugin definitions loaded.
Is it possible that my Python2.7 scripts are now trying to run as Python3 ?

Any thoughts?

Thanks.
User avatar
waltervl
Posts: 5734
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Python scripts don't run since upgrading to v2025.1

Post by waltervl »

Could well be, I am surprised python2 scripts even were still running on current environments.

Does the log file mentions anything special when you trigger the on action?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
StratosHF
Posts: 14
Joined: Sunday 18 September 2016 18:33
Target OS: Raspberry Pi / ODroid
Domoticz version: 2025.1
Location: Oxford
Contact:

Re: Python scripts don't run since upgrading to v2025.1

Post by StratosHF »

Fixed it!

The issue was due to my json commands using an out of date command...

Code: Select all

/json.htm?type=devices
now needs to be

Code: Select all

/json.htm?type=command&param=getdevices
https://wiki.domoticz.com/Domoticz_API/JSON_URL%27s

All my own fault!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest