-
-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: can't set attributes of built-in/extension type 'NoneType' in <script> at line number 1 #8
Comments
Hello Aitor, I haven't seen this error before. Have you tried loading an empty script and seeing if the same error occurs? Steve |
Hello Steve! Thank you for your fast reply 👍 Yeah, I have tried with an empty script file and the log file says that the script has been loaded with no apparent error:
I'm going to start over with the latest stable release of openHAB (2.1.0) and see if things change a little bit. What version of openHAB2 are you using? Because I asume you are using Jython 2.7.0, right? Thanks for your help and I will report back with my findings! Aitor |
Hi, have you defined some items? |
Wow @spacemanspiff2007, that was the problem! ✌️ Everything is working properly now, awesome! Many thanks for your help guys, time to start playing with the rules 👍 |
Well, @spacemanspiff2007 and @steve-bate , I am not sure this should be closed. I am seeing the same symptom and I have extensive items defined in .items files. Do these have to be otherwise exposed to jython ? Running a standalone jython 2.7.1 on RPi3. Latest (or near-latest) dev build of OH2 running under Openhabian. (NB the jython 2.7.1 full distro does not install correctly on RPi3 -- fails on setuptools installation). I have following defined in /etc/default/openhab2: EXTRA_JAVA_OPTS="-Xbootclasspath/a:/home/openhabian/jython2.7.1/jython.jar |
Hi @steve-bate !
I want to try the set of decorators and functions you have developed for jython but, although I have tried lots of things in the last couple of hours, I haven't achieved anything yet. Can you help me? ;-)
This is my development environment:
It seems that everything is correctly setup, but if I create a demo test.py file ("/etc/openhab2/automation/jsr223/test.py") with just the following line:
from openhab.log import logging
I get the error you can see in the title:
2017-12-05 16:44:36.729 [ERROR] [ipt.internal.ScriptEngineManagerImpl] - Error during evaluation of script 'file:/etc/openhab2/automation/jsr223/test.py': TypeError: can't set attributes of built-in/extension type 'NoneType' in <script> at line number 1
Do you have any idea about what's going on? I don't know what else I could try :(
Many many thanks for reading my message and for the code that you have contributed to this repository, it's really great!
Best regards,
Aitor
The text was updated successfully, but these errors were encountered: