Script problems after upgrade to openhab 5

after upgrade all function seems to be ok except the following log messages:

/etc/openhab/automation/jsr223/python/core/components/100_DirectoryTrigger.py wird nicht ausgeführt
Error during evaluation of script ‘/etc/openhab/automation/jsr223/python/core/components/100_DirectoryTrigger.py’: null in /etc/openhab/automation/jsr223/python/core/components/100_DirectoryTrigger.py at line number 2 at column number 1

possible result is that not all rule function is ok
i moved all rules out of the rule directory, after move them back everything is ok

Did you follow the current recommended process of

  1. upgrade
  2. wait for a bit for things to settle
  3. restart OH

If not, the error may have been that the rule engine started running before the Python add-on was reinstalled and available. Unfortunately this is a common problem after the clearing of the cache (which is done as part of the upgrade). But the above process mitigates the problem by giving OH time to reinstall all the add-ons and ignoring the errors on that first boot where transitory errors are likely to occur.

I guess, the mentioned scripts are part of older external jython helper libs, which are not supported. These scripts are completly replaced by the new included helper libs.

Just follow the documentation, how to migrate.

The python binding itself has a readme too.

its not the problem on the first boot. the upgrade was done weeks before. now the state is stable and the error occurs on every openhab restart even without any rule

does this mean i have to delete the scripts?

1 Like