|
From: Monson, K. E <Kyl...@pn...> - 2016-03-31 22:19:19
|
Joel, We've run into a problem that only seems to happen with recent versions of bacpypes. When we run our bacnet configuration grabbing utility (here https://github.com/VOLTTRON/volttron/blob/feature/bacnet_device_id/scripts/bacnet/grab_bacnet_config.py) we are running into an error on some devices: Traceback (most recent call last): File "grab_bacnet_config.py", line 485, in <module> main() File "grab_bacnet_config.py", line 480, in main process_object(this_application, target_address, obj_type, index, args.max_range_report, config_writer) File "grab_bacnet_config.py", line 247, in process_object default_value = read_prop(app, address, obj_type, index, "relinquishDefault") File "grab_bacnet_config.py", line 157, in read_prop value = result.propertyValue.cast_out(datatype) File "/home/intel/git/volttron/env/lib/python2.7/site-packages/bacpypes/constructeddata.py", line 1085, in cast_out helper = klass(self.tagList[0]) File "/home/intel/git/volttron/env/lib/python2.7/site-packages/bacpypes/primitivedata.py", line 1002, in __init__ self.decode(arg) File "/home/intel/git/volttron/env/lib/python2.7/site-packages/bacpypes/primitivedata.py", line 1086, in decode raise InvalidTag("enumerated application tag required") InvalidTag: enumerated application tag required If we roll bacpypes back to 0.13.2 the error goes away. Other slightly newer versions may work but I didn't try them all. (I can only replicate these errors with customer devices and had limited opportunity to mess with it.) I know for certain that 0.13.7 and 0.13.6 don't work. I'm checking the type of the object returned by the by the read property call to make sure it's a ReadPropertyACK and raising an exception if it's not. (See line 149) I think some reason we are getting a bad ReadPropertyACK back instead of an error. What do you think? Kyle |