Botium 脚本内存:预期的机器人响应不匹配
Botium scripting memory: Expected bot response not matched
我在使用 Botium 时遇到以下错误:
TranscriptError: Error: GetNewGetDeleteGet/Line 27: Expected bot
response (on Line 20: #me - getID ) "99 | This is a test" to match
one of "$id | This is a test"
at async.waterfall (/usr/local/lib/node_modules/botium-cli/node_modules/botium-core/src/scripting/Convo.js:160:25)
Convo 文件:
#me: getID
#bot: $id | This is a test
为了启动 Botium,我这样做:sudo botium-cli run mochawesome
我已经启动了这个命令:export BOTIUM_ENABLE_MEMORY=true
有什么想法吗?
Botium 应该接受机器人的回答并将 99 保存到变量 $id 中,不是吗?
编辑:将 SCRIPTING_ENABLE_MEMORY=true 添加到配置文件后
convo.txt:
#me
get
#bot default
*Hier sind deine Erinnerungen:*
Keine Notizen, oder alles erledigt.
错误:
TranscriptError: Error: GetNewGetDeleteGet/Line 11: error waiting for bot SyntaxError: Invalid regular expression: /*Hier sind deine Erinnerungen:* Keine Notizen, oder alles erledigt./: Nothing to repeat at String.match (native) at utterances.forEach.expected (/usr/local/lib/node_modules/botium-cli/node_modules/botium-core/src/scripting/Convo.js:359:38) at Array.forEach (<anonymous>) at Convo._fillScriptingMemory (/usr/local/lib/node_modules/botium-cli/node_modules/botium-core/src/scripting/Convo.js:353:18) at scriptingEvents.onBotStart.then.then (/usr/local/lib/node_modules/botium-cli/node_modules/botium-core/src/scripting/Convo.js:256:22) at <anonymous>
Dialogflow shows the answer like this
我的代码是这样发出来的:
{'fulfillmentText': '*Hier sind deine Erinnerungen:*\n\nKeine Notizen, oder alles erledigt.'}
编辑 2:
After removing the *
Convo.txt
编辑 3:
Error Full error log
编辑 4:
Verbose Log
有两个问题:
- 要设置的环境变量是BOTIUM_SCRIPTING_ENABLE_MEMORY
- 通常,当 运行 带有 sudo 的命令时,您将丢失环境变量。您可以将功能 SCRIPTING_ENABLE_MEMORY 添加到 botium.json 文件中。
我在使用 Botium 时遇到以下错误:
TranscriptError: Error: GetNewGetDeleteGet/Line 27: Expected bot response (on Line 20: #me - getID ) "99 | This is a test" to match one of "$id | This is a test" at async.waterfall (/usr/local/lib/node_modules/botium-cli/node_modules/botium-core/src/scripting/Convo.js:160:25)
Convo 文件:
#me: getID
#bot: $id | This is a test
为了启动 Botium,我这样做:sudo botium-cli run mochawesome
我已经启动了这个命令:export BOTIUM_ENABLE_MEMORY=true
有什么想法吗? Botium 应该接受机器人的回答并将 99 保存到变量 $id 中,不是吗?
编辑:将 SCRIPTING_ENABLE_MEMORY=true 添加到配置文件后
convo.txt:
#me
get
#bot default
*Hier sind deine Erinnerungen:*
Keine Notizen, oder alles erledigt.
错误:
TranscriptError: Error: GetNewGetDeleteGet/Line 11: error waiting for bot SyntaxError: Invalid regular expression: /*Hier sind deine Erinnerungen:* Keine Notizen, oder alles erledigt./: Nothing to repeat at String.match (native) at utterances.forEach.expected (/usr/local/lib/node_modules/botium-cli/node_modules/botium-core/src/scripting/Convo.js:359:38) at Array.forEach (<anonymous>) at Convo._fillScriptingMemory (/usr/local/lib/node_modules/botium-cli/node_modules/botium-core/src/scripting/Convo.js:353:18) at scriptingEvents.onBotStart.then.then (/usr/local/lib/node_modules/botium-cli/node_modules/botium-core/src/scripting/Convo.js:256:22) at <anonymous>
Dialogflow shows the answer like this
我的代码是这样发出来的:
{'fulfillmentText': '*Hier sind deine Erinnerungen:*\n\nKeine Notizen, oder alles erledigt.'}
编辑 2:
After removing the *
Convo.txt
编辑 3: Error Full error log
编辑 4: Verbose Log
有两个问题:
- 要设置的环境变量是BOTIUM_SCRIPTING_ENABLE_MEMORY
- 通常,当 运行 带有 sudo 的命令时,您将丢失环境变量。您可以将功能 SCRIPTING_ENABLE_MEMORY 添加到 botium.json 文件中。