我正在使用RASA
堆栈创建一个天气机器人。我正在尝试访问NLU Trainer GUI
,但遇到错误。
它说即使我创建了一个JSON文件也找不到训练文件,它存储在-Desktop/weather_bot/data
中。sudo npm i -g rasa-nlu-trainer
但是,当我尝试使用rasa-nlu-trainer访问GUI时,出现以下错误
Desktop/weather_bot/data/data.json
searching for the training examples...
(node:31971) UnhandledPromiseRejectionWarning: Error: Can't find training file, please try to specify it with the --source option
at checkDone (/usr/local/lib/node_modules/rasa-nlu-trainer/server.js:98:15)
at readData.then.catch.then (/usr/local/lib/node_modules/rasa-nlu-trainer/server.js:128:11)
at <anonymous>
(node:31971) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:31971) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
\
最佳答案
通常是由于server.js中的这行代码if(!json.rasa_nlu_data){ return reject("....") }
引发此错误,要解决此问题,请尝试在您的data.json文件或培训数据文件中将{"rasa_nlu_data": {
作为第一行代码,希望这样做将解决您的问题,