Error in interpolate_text when value contains 0[
See original GitHub issueRasa version:
1.3.4
Rasa X version (if used & relevant):
Python version:
3.7
Operating system (windows, osx, …):
Windows
Issue:
Rasa fails to interpolate a template when one of the values contains a 0[
. The code that triggers the error is here:
https://github.com/RasaHQ/rasa/blob/master/rasa/core/nlg/interpolator.py#L19
My response contains an a string np0[0...n]
in one of the values (the {result}
placeholder in the traceback below). All values are inserted correctly into the template, so the additional template.format({})
fails and triggers the except
. Even the error message is wrong, as Rasa complains a missing value but inserted all values happily before. So the traceback below shows a wrong error, but at least the correct line.
Error (including full traceback):
2019-10-02 10:26:32 ERROR rasa.core.nlg.interpolator - Failed to fill utterance template 'Top {number_of_results} {documents} zum Thema {topic}:
{result}'. Tried to replace 'number_of_results' but could not find a value for it. There is no slot with this name nor did you pass the value explicitly when calling the template. Return template without filling the template.
Traceback (most recent call last):
File "c:\users\z003y0rv\projects\code.siemens\ai4am-chatbot\venv\lib\site-packages\rasa\core\nlg\interpolator.py", line 25, in interpolate_text
return template.format({})
KeyError: 'number_of_results'
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (3 by maintainers)
Top GitHub Comments
At the moment I do not have access to the code of the project unfortunately. Before I got passed the issue by replacing all
0[
in my texts, though. I will get back to the project later this month and try to reproduce, then I can compare check all the slots and see why the error occurs exactly.This issue has been automatically closed due to inactivity. Please create a new issue if you need more help.