You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was facing the same issue, but I found a workaround. In version 23.7.3 the regarding code snippet is
ifshow_property_name:
try:
int(
propertyIdentifier
) # else it will be a name like maxMasterprop_id="@prop_{}".format(propertyIdentifier)
_obj, _id=apdu.listOfReadAccessResults[
0
].objectIdentifier_key= (str(_obj), vendor_id)
if_keyinregistered_object_types.keys():
_classname=registered_object_types[_key].__name__fork, vinregistered_object_types["BAC0"][
_classname
].items():
ifv["obj_id"] ==propertyIdentifier:
prop_id= (k, propertyIdentifier) # type: ignoreifisinstance(value, dict):
value=list(value.items())[0][1]
exceptValueError:
prop_id=propertyIdentifiervalues.append((value, prop_id))
dict_values[objectIdentifier].append(
(_prop_id, (value, prop_id))
)
else:
values.append(value)
dict_values[objectIdentifier].append((_prop_id, value))
The try is only successful, if the property is a proprietary one and is identified by a number instead of a name. So then the problem causing line is reached. I am not really sure what the rest of the code does or should do, but compared to the except block, which is executed if the property is a known one (e. g. maxMaster), we basicly just have to define the prop_id. So for me it worked to just comment out the try block after
prop_id = "@prop_{}".format(propertyIdentifier)
That is also very similar to the current version 2024.09.20. Here the equvilent code is
When I'm doing the following request go read all the properties of an object instance :
I get a
KeyError
exception :If i do instead
I get the list of properties with their values
The text was updated successfully, but these errors were encountered: