Custom response is not working in rasa 1.6

Hi, I just upgrate rasa to 1.6 from 1.4 and part of my code not working: This is a custom response of a text with scale:
utter_ask_emotion_intensity:

  • custom: data: attachment: type: scale payload: min: 1 min_label: Weak max_label: Strong max: 5 slot: emotion_intensity text: “How intense is that on average?”

It was working on rasa 1.4, but I got this error after I upgrade to 1.6: rasa-production_1 | 2020-01-17 05:14:58 DEBUG rasa.core.processor - expected string or bytes-like object rasa-production_1 | Traceback (most recent call last): rasa-production_1 | File “/build/lib/python3.6/site-packages/rasa/core/processor.py”, line 564, in run_action rasa-production_1 | events = await action.run(output_channel, nlg, tracker, self.domain) rasa-production_1 | File “/usr/local/lib/python3.6/asyncio/coroutines.py”, line 110, in next rasa-production_1 | return self.gen.send(None) rasa-production_1 | File “/build/lib/python3.6/site-packages/rasa/core/actions/action.py”, line 253, in run rasa-production_1 | message = await nlg.generate(self.template_name, tracker, output_channel.name()) rasa-production_1 | File “/usr/local/lib/python3.6/asyncio/coroutines.py”, line 110, in next rasa-production_1 | return self.gen.send(None) rasa-production_1 | File “/build/lib/python3.6/site-packages/rasa/core/nlg/template.py”, line 77, in generate rasa-production_1 | template_name, filled_slots, output_channel, **kwargs rasa-production_1 | File “/build/lib/python3.6/site-packages/rasa/core/nlg/template.py”, line 93, in generate from_slots rasa-production_1 | return self._fill_template(r, filled_slots, **kwargs) rasa-production_1 | File “/build/lib/python3.6/site-packages/rasa/core/nlg/template.py”, line 119, in _fill_te mplate rasa-production_1 | template[key] = interpolate(template[key], template_vars) rasa-production_1 | File “/build/lib/python3.6/site-packages/rasa/core/nlg/interpolator.py”, line 51, in inter polate rasa-production_1 | template[k] = [interpolate(i, values) for i in v] rasa-production_1 | File “/build/lib/python3.6/site-packages/rasa/core/nlg/interpolator.py”, line 51, in rasa-production_1 | template[k] = [interpolate(i, values) for i in v] rasa-production_1 | File “/build/lib/python3.6/site-packages/rasa/core/nlg/interpolator.py”, line 49, in inter polate rasa-production_1 | interpolate(v, values) rasa-production_1 | File “/build/lib/python3.6/site-packages/rasa/core/nlg/interpolator.py”, line 53, in inter polate rasa-production_1 | template[k] = interpolate_text(v, values) rasa-production_1 | File “/build/lib/python3.6/site-packages/rasa/core/nlg/interpolator.py”, line 17, in inter polate_text rasa-production_1 | text = re.sub(r"{([^\n{}]+?)}", r"{0[\1]}", template) rasa-production_1 | File “/usr/local/lib/python3.6/re.py”, line 191, in sub rasa-production_1 | return _compile(pattern, flags).sub(repl, string, count) rasa-production_1 | TypeError: expected string or bytes-like object

Please help, thank you!

I sloved this problem by using a custom action: dispatcher.utter_custom_json(data) still have no idea why the custom payload in domain file not working in rasa 1.6 though, I made no change

Hi @JialiuXu,

Could you please format your question? It’s currently quite hard for me to understand what’s going on.