JustinaPetr / Weatherbot_Tutorial

275 stars 447 forks source link

No response from the bot - AttributeError: __enter__ #54

Open vishnuragas opened 5 years ago

vishnuragas commented 5 years ago

Rasa Core version: 0.11.12 Python version: 3.6.6 Operating system: Windows Server 2012 R2 Standard

Hi, I tried to train the bot for few stories and get a 'hi' (greet) response from it. There is no response from the bot when I try to communicate via terminal. Below is the behavior. Once I enter 'hi' and hit enter, I get the following error.

Bot loaded. Type a message and press enter (use '/stop' to exit):
hi
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__
127.0.0.1 - - [2018-12-07 11:13:08] "POST /webhooks/rest/webhook?stream=true&tok
en= HTTP/1.1" 200 219 0.499612
Manvitha1 commented 5 years ago

This is the exact issue i am facing too , please do provide the solution

ravindrandandala commented 5 years ago

Yes, I'm also facing the same issue. Please could you look into this.

In most other cases you should consider using 'safe_load(stream)' data = yaml.load(stream) Bot loaded. Type a message and press enter (use '/stop' to exit): hello C:\Users\SONY\Anaconda3\envs\python3.6\lib\site-packages\sklearn\preprocessing\l abel.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: Hello! How can I help? 127.0.0.1 - - [2019-04-04 14:24:00] "POST /webhooks/rest/webhook?stream=true&tok en= HTTP/1.1" 200 222 0.304018 weather in london C:\Users\SONY\Anaconda3\envs\python3.6\lib\site-packages\sklearn\preprocessing\l abel.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: 127.0.0.1 - - [2019-04-04 14:24:12] "POST /webhooks/rest/webhook?stream=true&tok en= HTTP/1.1" 200 154 1.692097