Closed agners closed 3 years ago
When trying to add an array of dictionaries as an argument append_objects() throws an exception:
append_objects()
>>> request = dbussy.Message.new_method_call(..) >>> request.append_objects("aa{si}", [ { "a": 12, "b": 12 } ]) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/sag/.local/lib/python3.9/site-packages/dbussy.py", line 4451, in append_objects append_sub(parse_signature(signature), args, self.iter_init_append()) File "/home/sag/.local/lib/python3.9/site-packages/dbussy.py", line 4415, in append_sub if type_is_fixed_array_elttype(arrelttype.code.value) : AttributeError: 'DictType' object has no attribute 'code'
I think I have fixed this: the problem is that DictType was forgetting to call the init for the Type superclass. See if it works now.
DictType
Type
Yes, that did the trick! Thanks!
When trying to add an array of dictionaries as an argument
append_objects()
throws an exception: