【问题标题】:Rasa core agent.handle_channelRasa 核心代理.handle_channel
【发布时间】:2018-12-12 00:30:09
【问题描述】:

我正在尝试为我的机器人进行松弛集成。这是我的 python 脚本,它将在 slack 上运行机器人:

from rasa_core.channels import HttpInputChannel
from rasa_core.agent import Agent
from rasa_core.interpreter import RasaNLUInterpreter
from rasa_slack_connector import SlackInput


nlu_interpreter = RasaNLUInterpreter('./model/nlu/default/weathernlu')
agent = Agent.load('./model/dialogue', interpreter = nlu_interpreter)

input_channel = SlackInput('*******', #app verification token
                            '*******', # bot verification token
                            '********', # slack verification token
                            True)

agent.handle_channel(HttpInputChannel(5006, '/', input_channel))

我的问题是每次我关闭应用程序并尝试运行它时,我都无法使用相同的端口。我从 5000 开始,你可以看到我达到了 5006,因为我每次都必须更改它。如果我尝试使用相同的端口运行它,我会收到此错误:

OSError: [WinError 10048] 每个套接字地址只能使用一次 (协议/网络地址/端口)通常是允许的

谁能解释这是怎么回事?

【问题讨论】:

    标签: python sockets operating-system agent rasa-core


    【解决方案1】:

    您应该检查使用 cmd netstat 绑定的端口,并检查仍在您的机器上运行的进程。

    关闭您的应用可能不会终止进程,因此您之前的应用实例可能仍会使用端口。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-02-12
      • 2019-06-07
      • 1970-01-01
      • 2019-04-19
      相关资源
      最近更新 更多