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
Have a script that queries information about a phone and its lines, and then attempts to update a Line on that Phone. I feel pretty certain I have the syntax of the update correct, but I am getting the error "TypeError: Choice elements only work with keyword arguments"
Here is the code where I am trying to update the line:
Traceback (most recent call last):
File "/usr/local/bin/uc_dev_phone_update_mask.py", line 70, in
('70359', 'Internal', 'Rick Atlansky', 'Rick Atlansky', 'Rick Atlansky 70359', '0294127777')
File "/usr/local/lib/python3.6/dist-packages/ciscoaxl/axl.py", line 2084, in update_phone
return self.client.updatePhone(**args)
File "/usr/local/lib/python3.6/dist-packages/zeep/proxy.py", line 45, in call
kwargs,
File "/usr/local/lib/python3.6/dist-packages/zeep/wsdl/bindings/soap.py", line 119, in send
operation, args, kwargs, client=client, options=options
File "/usr/local/lib/python3.6/dist-packages/zeep/wsdl/bindings/soap.py", line 68, in _create
serialized = operation_obj.create(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/zeep/wsdl/definitions.py", line 215, in create
return self.input.serialize(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/zeep/wsdl/messages/soap.py", line 68, in serialize
body_value = self.body(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/elements/element.py", line 57, in call
instance = self.type(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/types/complex.py", line 49, in call
return self._value_class(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/valueobjects.py", line 95, in init
items = _process_signature(self._xsd_type, args, kwargs)
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/valueobjects.py", line 209, in _process_signature
values = element.parse_kwargs(kwargs, None, available_kwargs)
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/elements/indicators.py", line 205, in parse_kwargs
sub_result = element.parse_kwargs(kwargs, elm_name, available_kwargs)
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/elements/indicators.py", line 457, in parse_kwargs
subresult = choice.parse_kwargs(kwargs, name, temp_kwargs)
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/elements/element.py", line 134, in parse_kwargs
return self.type.parse_kwargs(kwargs, name or self.attr_name, available_kwargs)
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/types/complex.py", line 309, in parse_kwargs
value = self._create_object(value, name)
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/types/complex.py", line 325, in _create_object
return [self._create_object(val, name) for val in value]
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/types/complex.py", line 325, in
return [self._create_object(val, name) for val in value]
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/types/complex.py", line 335, in _create_object
return self(value)
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/types/complex.py", line 49, in call
return self._value_class(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/valueobjects.py", line 95, in init
items = _process_signature(self._xsd_type, args, kwargs)
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/valueobjects.py", line 185, in _process_signature
values, args, index = element.parse_args(args, index)
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/elements/indicators.py", line 321, in parse_args
raise TypeError("Choice elements only work with keyword arguments")
TypeError: Choice elements only work with keyword arguments
CUCM version 11.51.15900-18
Have a script that queries information about a phone and its lines, and then attempts to update a Line on that Phone. I feel pretty certain I have the syntax of the update correct, but I am getting the error "TypeError: Choice elements only work with keyword arguments"
Here is the code where I am trying to update the line:
Here is the resulting error:
Traceback (most recent call last):
File "/usr/local/bin/uc_dev_phone_update_mask.py", line 70, in
('70359', 'Internal', 'Rick Atlansky', 'Rick Atlansky', 'Rick Atlansky 70359', '0294127777')
File "/usr/local/lib/python3.6/dist-packages/ciscoaxl/axl.py", line 2084, in update_phone
return self.client.updatePhone(**args)
File "/usr/local/lib/python3.6/dist-packages/zeep/proxy.py", line 45, in call
kwargs,
File "/usr/local/lib/python3.6/dist-packages/zeep/wsdl/bindings/soap.py", line 119, in send
operation, args, kwargs, client=client, options=options
File "/usr/local/lib/python3.6/dist-packages/zeep/wsdl/bindings/soap.py", line 68, in _create
serialized = operation_obj.create(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/zeep/wsdl/definitions.py", line 215, in create
return self.input.serialize(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/zeep/wsdl/messages/soap.py", line 68, in serialize
body_value = self.body(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/elements/element.py", line 57, in call
instance = self.type(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/types/complex.py", line 49, in call
return self._value_class(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/valueobjects.py", line 95, in init
items = _process_signature(self._xsd_type, args, kwargs)
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/valueobjects.py", line 209, in _process_signature
values = element.parse_kwargs(kwargs, None, available_kwargs)
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/elements/indicators.py", line 205, in parse_kwargs
sub_result = element.parse_kwargs(kwargs, elm_name, available_kwargs)
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/elements/indicators.py", line 457, in parse_kwargs
subresult = choice.parse_kwargs(kwargs, name, temp_kwargs)
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/elements/element.py", line 134, in parse_kwargs
return self.type.parse_kwargs(kwargs, name or self.attr_name, available_kwargs)
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/types/complex.py", line 309, in parse_kwargs
value = self._create_object(value, name)
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/types/complex.py", line 325, in _create_object
return [self._create_object(val, name) for val in value]
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/types/complex.py", line 325, in
return [self._create_object(val, name) for val in value]
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/types/complex.py", line 335, in _create_object
return self(value)
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/types/complex.py", line 49, in call
return self._value_class(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/valueobjects.py", line 95, in init
items = _process_signature(self._xsd_type, args, kwargs)
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/valueobjects.py", line 185, in _process_signature
values, args, index = element.parse_args(args, index)
File "/usr/local/lib/python3.6/dist-packages/zeep/xsd/elements/indicators.py", line 321, in parse_args
raise TypeError("Choice elements only work with keyword arguments")
TypeError: Choice elements only work with keyword arguments
Here is the entire script:
The text was updated successfully, but these errors were encountered: