setChannelVar throwing an error in ARI

Hi,
I am using official [ARI python code](https://github.com/asterisk/ari-py).
when i am trying to use setChannelVar: POST /channels/{channelId}/variable function as channel.setChannelVar('lastVal', 'here'), I am getting the error

 channel.setChannelVar('lastVal,'here')
TypeError: enrich_operation() takes exactly 0 arguments (2 given)

but when I see the [official documentation](https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Channels+REST+API#Asterisk13ChannelsRESTAPI-setChannelVar) it says this function is supposed to be used like that.
kindly help me figure out what am i doing wrong?
Asterisk - 15.5
Thanks.

Hi,

it is a bit late but here you have the solution. :grin:

You have to call:

channel.setChannelVar(variable='lastVal,value=‘here’)

The declaration of the param names “variable” and “value” are needed because the function “enrich_operation” takes the params as **kwargs.

The same is valid if you want to GET a variable value, you have to call:

channel.getChannelVar(variable=‘lastVal’)

Hope it helps! :wink: