Hi,
I’m running openhab in an ARM_ODROID_XU/2Gb/512GB using OS Ubuntu 18.04.3 LTS. The JVM is 1.8.0_181-b13. On the top, I have an openHAB version 2.4 running.
My problem:
After following the very detailed instructions (thanks for this work guys) available at https://openhab-scripters.github.io taking care of not missing any of the items.
I managed to install both the New generation rule engine and all the community scripts in both jsr223 and lib folder. I tried both the files contained in the file master.zip
, that can be downloaded from the website, and also I tried with the master branch fetched with git.
As suggested in the instructions, I test it using the hello_world.py but it fails, showing:
2019-09-15 15:47:09.286 [INFO ] [rt.internal.loader.ScriptFileWatcher] - Loading script 'python/personal/hello_world.py'
2019-09-15 15:47:09.724 [ERROR] [ipt.internal.ScriptEngineManagerImpl] - Error during evaluation of script file:/etc/openhab2/automation/jsr223/python/personal/hello_world.py': TypeError: Error when calling the metaclass bases
Actually, the line producing the error is the second one of the import section:
from core.rules import rule
from core.triggers import when
IMHO, the problem affecting hello_world.py comes first during the initialisation of the scripts. It waits for the context to be ready up to 30 seconds, but one of the scripts (100_OsgiEventTrigger.py) fails (the rest are fine):
2019-09-15 16:00:43.572 [INFO ] [jsr223.jython.core.startup_delay ] - Complete
2019-09-15 16:00:43.575 [DEBUG] [rt.internal.loader.ScriptFileWatcher] - Script loaded: python/core/000_startup_delay.py
2019-09-15 16:00:43.576 [INFO ] [rt.internal.loader.ScriptFileWatcher] - Loading script 'python/core/components/100_DirectoryTrigger.py'
2019-09-15 16:00:46.130 [INFO ] [23.jython.core.DirectoryEventTrigger] - TriggerHandler added [jsr223.DirectoryTrigger]
2019-09-15 16:00:46.139 [INFO ] [23.jython.core.DirectoryEventTrigger] - TriggerType added [jsr223.DirectoryTrigger]
2019-09-15 16:00:46.140 [DEBUG] [rt.internal.loader.ScriptFileWatcher] - Script loaded: python/core/components/100_DirectoryTrigger.py
2019-09-15 16:00:46.142 [INFO ] [rt.internal.loader.ScriptFileWatcher] - Loading script 'python/core/components/100_OsgiEventTrigger.py'
2019-09-15 16:00:47.232 [ERROR] [ipt.internal.ScriptEngineManagerImpl] - Error during evaluation of script 'file:/etc/openhab2/automation/jsr223/python/core/components/100_OsgiEventTrigger.py': TypeError: Error when calling the metaclass bases
cannot create 'NoneType' instances in <script> at line number 17
2019-09-15 16:00:47.233 [DEBUG] [rt.internal.loader.ScriptFileWatcher] - Script loaded: python/core/components/100_OsgiEventTrigger.py
The line (16) producing the error is the following:
16: import core
17: from core.osgi.events import OsgiEventAdmin, event_dict, osgi_triggers
18: from core.log import logging, LOG_PREFIX
-
Please post configurations (if applicable):
There are two python versions 2.7 and 3 running in the machine, but i’m sure it is taking 2.7. The jython bundle is 2.7.0, but also tried with 2.7.1-
Items configuration related to the issue
I think it does not apply but, openhab manages a KNX system and several other MQTT DIY electronics and some zigbee components visible to the system by means of MQTT (instead of using the zigbee binding) -
Sitemap configuration related to the issue
No sitemap related to the tipic -
Rules code related to the issue
Just the helloworld provided as a Script Example
-
Thanks in advance
Dani