Custom Output Payloads when using socketio

Payloads are not returned when using custom output and connecting with socketio.

like so:

utter_goodbye: - custom: - text: Bye12345678w2w - name: 123

When using rest via Postman it returns correct:

[ { "recipient_id": "www", "custom": [ { "text": "Bye12345678w2w" }, { "name": 123 } ] } ]

socketio is returning error in rasa:

ERROR asyncio - Task exception was never retrieved future: <Task finished coro=<AsyncServer._handle_event_internal() done, defined at /Users/tschnoelzer/Documents/development/CmbEnterprise/rasa/dealdog/venv/lib/python3.7/site-packages/socketio/> exception=AttributeError("‘list’ object has no attribute ‘setdefault’")>

Rasa 1.4.0

Can you open a Github issue in rasa together with this information? I’m pretty sure it’s a bug. You can also tag me there with @wochinge . Thanks!

Hm, but the output of custom shouldn’t be a list but rather a dict (json object). I think it’s rather a bug that it outputs correctly in rest :smile:

looks like you have defined it as so:

  - custom:
     - text: Bye12345678w2w
     - name: 123

when it should be defined as

  - custom:
      text: Bye12345678w2w
      name: 123

(this output probably won’t appear in socket because it’s not wrapped in data: as socket expects, but it shouldn’t throw the error)

Hi team,

I tried in lots of fashions… didnt know the data: thing … just read …:

I can confirm the socket works with this:

utter_goodbye: - custom: data: text: Bye12345678w2w name: 1223



btw: no luck returning any facebook generic card. opened a thread on this some minutes ago…