代码之家  ›  专栏  ›  技术社区  ›  Hackerds

RASA:尝试与bot通信时出现连接中止错误

  •  1
  • Hackerds  · 技术社区  · 6 年前

    我有不同的故事,作为一个起点,我想让机器人回复问候(嗨,你好等)

    https://github.com/JustinaPetr/Weatherbot_Tutorial/tree/master/Full%20Code%20%5BLatest%20release%20of%20Rasa%20NLU%20and%20Rasa%20Core%5D

    我可以成功地训练这个模型。(run_model.py)。当我运行dialogue_management_model.py时,遇到以下错误。

    我得到以下提示键入消息,然后输入“Hello”并按“enter”

    Bot loaded. Type a message and press enter (use '/stop' to exit):
    hello
    

    以下是 '属性错误'

    C:\ProgramData\Anaconda3\envs\sschatbot\lib\site-packages\sklearn\preprocessing\
    label.py:151: DeprecationWarning: The truth value of an empty array is ambiguous
    . Returning False, but in future this will result in an error. Use `array.size >
     0` to check that an array is not empty.
      if diff:
    Exception in thread Thread-7:
    Traceback (most recent call last):
      File "C:\ProgramData\Anaconda3\envs\sschatbot\lib\threading.py", line 916, in
    _bootstrap_inner
        self.run()
      File "C:\ProgramData\Anaconda3\envs\sschatbot\lib\threading.py", line 864, in
    run
        self._target(*self._args, **self._kwargs)
      File "C:\ProgramData\Anaconda3\envs\sschatbot\lib\site-packages\rasa_core\chan
    nels\console.py", line 110, in record_messages
        for response in bot_responses:
      File "C:\ProgramData\Anaconda3\envs\sschatbot\lib\site-packages\rasa_core\chan
    nels\console.py", line 67, in send_message_receive_stream
        stream=True) as r:
    AttributeError: __enter__
    

    这是 '连接中止错误'

     Traceback (most recent call last):
          File "C:\ProgramData\Anaconda3\envs\sschatbot\lib\site-packages\gevent\pywsgi.
        py", line 936, in handle_one_response
            self.run_application()
          File "C:\ProgramData\Anaconda3\envs\sschatbot\lib\site-packages\gevent\pywsgi.
        py", line 910, in run_application
            self.process_result()
          File "C:\ProgramData\Anaconda3\envs\sschatbot\lib\site-packages\gevent\pywsgi.
        py", line 896, in process_result
            self.write(data)
          File "C:\ProgramData\Anaconda3\envs\sschatbot\lib\site-packages\gevent\pywsgi.
        py", line 742, in write
            self._write_with_headers(data)
          File "C:\ProgramData\Anaconda3\envs\sschatbot\lib\site-packages\gevent\pywsgi.
        py", line 764, in _write_with_headers
            self._write(data)
          File "C:\ProgramData\Anaconda3\envs\sschatbot\lib\site-packages\gevent\pywsgi.
        py", line 724, in _write
            self._sendall(data)
          File "C:\ProgramData\Anaconda3\envs\sschatbot\lib\site-packages\gevent\pywsgi.
        py", line 702, in _sendall
            self.socket.sendall(data)
          File "C:\ProgramData\Anaconda3\envs\sschatbot\lib\site-packages\gevent\_socket
        3.py", line 418, in sendall
            data_sent += self.send(data_memory[data_sent:], flags)
          File "C:\ProgramData\Anaconda3\envs\sschatbot\lib\site-packages\gevent\_socket
        3.py", line 391, in send
            return _socket.socket.send(self._sock, data, flags)
        ConnectionAbortedError: [WinError 10053] An established connection was aborted b
        y the software in your host machine
        Thu Dec  6 16:25:33 2018 {'REMOTE_ADDR': '127.0.0.1', 'REMOTE_PORT': '50028', 'H
        TTP_HOST': 'localhost:5005', (hidden keys: 23)} failed with ConnectionAbortedErr
        or
    
        127.0.0.1 - - [2018-12-06 16:25:33] "POST /webhooks/rest/webhook?stream=true&tok
        en= HTTP/1.1" 200 153 0.265938
    
    0 回复  |  直到 6 年前
    推荐文章