Hi All. I’ve been getting heavy into Jython scripting recently and have run into an issue on OH in a Docker container. It’s OH 2.5.8. I originally had the beta add-on installed and everything was running fine. I just tried the manual upgrade to jython-standalone-2.7.0.jar and am getting the following error for all python scripts (note, I’m just showing hello_world as an example, but it’s happening with all scripts):
Error during evaluation of script 'file:/openhab/conf/automation/jsr223/python/personal/hello_world.py': SystemError: Automatic proxy initialization should only occur on proxy classes in <script> at line number 8
For the upgrade, I shut down the container, pulled the org.openhab.core.automation.module.script.scriptenginefactory.jython-2.5.0-SNAPSHOT.jar file from add-ons, followed the instructions in installing the ython-standalone-2.7.0.jar file - as well as the latest helper libs from the https://openhab-scripters.github.io/openhab-helper-libraries site, changed the EXTRA_JAVA_OPTS in the docker-compose file to
EXTRA_JAVA_OPTS: "-Duser.timezone=America/Chicago -Xbootclasspath/a:/openhab/conf/automation/jython/jython-standalone-2.7.0.jar -Dpython.home=openhab/conf/automation/jython/ -Dpython.path=openhab/conf/automation/lib/python">
and checked the file locations in the container to make sure everything was in the right spot. When I got the errors initially, I stopped the container and manually removed the cache/ and tmp/ folders, then restarted. I’ve now restarted a couple of times, but the same errors persist. Any thoughts on troubleshooting?
Thanks in advance.
Just a quick edit: If I stop the container, add back the beta add-on, change EXTRA_JAVA_OPTS back, and restart the container, everything works again. I’m clearly missing something regarding not fully removing the old add-on configuration…