【发布时间】: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