Home Articles

watson-developer-cloud botkit-middleware资源未找到

Asked
Viewed 419 times
0

我是僵尸世界的新手 . 我正在尝试使用botkit中间件将IBM Watson上的Conversation服务创建与Slack Bot集成 . 我只是从Git获取代码(Botkit Slack Integration,我正在尝试使用它来回答来自我的Watson Conversation服务的Slack上的查询 . 但是,收到松弛消息后,API会返回以下错误 . 没有太多关于如何处理的文档互联网上的这些错误 . 有人可以帮帮我吗?

> node simple-bot-slack.js info:**没有指定持久存储方法!进程关闭时,数据可能会丢失 . info:**设置自定义处理程序以处理Slack消息信息:** API CALL:https://slack.com/api/rtm.start客户端服务器侦听端口5000通知:** BOT ID:jarvis ...尝试连接到RTM!注意:RTM websocket打开信息:收到Slack消息{type:'message',channel:'C72GK14JD',user:'U72VDTC2F',text:'Hi',ts:'1505453454.000117',source_team:'T733VG8DS',team:' T733VG8DS',事件:'direct_mention',匹配:['嗨',索引:0,输入:'嗨'],watsonError:{错误:在Request._callback找不到资源(D:\ node \ wrath \ botkit-middleware) -master \ examples \ simple-bot \ node_modules \ watson-developer-cloud \ lib \ requestwrapper.js:88:1 5)在Request.self.callback(D:\ node \ wrath \ botkit-middleware-master \ examples \ simple-bot \ node_modules \ request \ request.js:188:22)在requestTmit(events.js:191:7)的emitTwo(events.js:106:13)处于Request . (D:\ node \ wrath \ botkit-middleware-master \ examples \ simple-bot \ node_modules \ request \ request.js:1171:10)在emit.ene(events.js:96:13)处于Request.emit(事件 . js:188:7)在Gunzip . (D:\ node \ wrath \ botkit-middleware-master \ examples \ simple-bot \ node_modules \ request \ request.js:1091:12)at Gunzip.g(events.js:292:16)在emitNone(事件 . js:91:20)在end_adinedNT(_stream_readable.js:974:12)的Gunzip.emit(events.js:185:7)处于_combinedTickCallback(internal / process / next_tick.js:80:11)at process._tickCallback( internal / process / next_tick.js:104:9)原因:{错误:在Request._callback找不到资源(D:\ node \ wrath \ botkit-middleware-master \ examples \ simple-bot \ node_modules \ watson-developer- request.self.callback上的cloud \ lib \ requestwrapper.js:8 8:15)(D:\ node \ wrath \ botkit-middleware-master \ examples \ simple-bot \ node_modules \ request \ request.js:188:22 )在Request上的requests.emit(events.js:191:7)的emitTwo(events.js:106:13)处 . (D:\ node \ wrath \ botkit-middleware-master \ examples \ simple-bot \ node_modules \ request \ request.js:1171:10)在emit.ene(events.js:96:13)处于Request.emit(事件 . js:188:7)在Gunzip . (D:\ node \ wrath \ botkit-middleware-master \ examples \ simple-bot \ node_modules \ request \ request.js:1091:12)at Gunzip.g(events.js:292:16)在emitNone(事件 . js:91:20)在end_adinedNT(_stream_readable.js:974:12)的Gunzip.emit(events.js:185:7)处于_combinedTickCallback(internal / process / next_tick.js:80:11)at process._tickCallback( internal / process / next_tick.js:104:9)code:undefined,error:'Resource not found'},isOperational:true,code:undefined,error:'resource not found'}}

1 Answer

  • 0

    好的!未找到的资源来自botkit,因为它无法访问Conversation API . 我正在做的错误是我提供了我自己的对话服务工作区的URL而不是应该被提及的对话URL

    CONVERSATION_URL=https://gateway.watsonplatform.net/conversation/api

    我刚刚纠正了它,它就像黄油一样 . :)如果其他人面临同样的问题,我的建议是检查其他凭据 . 虽然看起来很简单,但总会发生错误 .

    快乐的编码!

Related