Closed lgb-this closed 7 years ago
You should have got an error message as this error should be caught and reported. What else would you expect how it should behave?
The code crashs and does not show an error message.
Did you test in standalone mode oder as plugin in SmartHomeNG? If SmartHomeNG: What does it tell with SmartHomeNG in Debug Mode?
Here the error (plugin in SmartHomeNG Develop): `2017-03-10 20:30:47 ERROR Main Plugin dlmsx exception: could not open port /dev/ttyUSB4: [Errno 2] No such file or directory: '/dev/ttyUSB4' Traceback (most recent call last): File "/usr/lib/python3/dist-packages/serial/serialposix.py", line 275, in open self.fd = os.open(self.portstr, os.O_RDWR|os.O_NOCTTY|os.O_NONBLOCK) FileNotFoundError: [Errno 2] No such file or directory: '/dev/ttyUSB4'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/smarthome/lib/plugin.py", line 90, in init
plugin_thread = PluginWrapper(smarthome, plugin, classname, classpath, args, instance)
File "/usr/local/smarthome/lib/plugin.py", line 144, in init
exec("self.plugin.init(smarthome{0}{1})".format("," if len(arglist) else "", argstring))
File "
Ok, some stacked exceptions. I'll change it to give some better error message. But anyhow it should not simply crash and say nothing...
I've fixed this and some other minor annoyance. Have to make a PR somehow ...
@bmxp / @lgb-this, is here still something open?
Solved for me.
I pushed the latest changes to develop. Please reopen if you find anything else.
I started with the dlms plugin (develop) with a wrong serialport. The code crashed with the line:
self._serial = serial.Serial(serialport, 300, bytesize=serial.SEVENBITS, parity=serial.PARITY_EVEN, timeout=2)