[Solved]TypeError: handle_channels() got an unexpected keyword argument 'serve_forever'

Hi All,

I am trying to execute my run_app.py script file but for Agent class function i.e handle_channels it’s giving me error as below mentioned :

Traceback (most recent call last):
  File ".\run_app.py", line 13, in <module>
    agent.handle_channels([input_channel], 5004, serve_forever=True)
TypeError: handle_channels() got an unexpected keyword argument 'serve_forever'

So, how do I solve it is there anything related to function parameters or signature change ??

Below is the screenshot for references:

Hi there, that param was removed so you can just remove it in the call. That means this code/tutorial is old though so it’s possible you will run into other errors.

Yes @erohmensing I tried it and followed proper method signature from updated docs for handle_channels() and it worked. Thanks :blush:

Like below :

agent.handle_channels([input_channel], http_port=5005,route=’/webhooks/’,cors="*")