JustinaPetr / Weatherbot_Tutorial

275 stars 447 forks source link

Dialogue_management_model.py runtime error #19

Closed lakindu95 closed 5 years ago

lakindu95 commented 5 years ago
Bot loaded. Type a message and press enter (use '/stop' to exit):

127.0.0.1 - - [2018-09-20 15:39:00] "POST /webhooks/rest/webhook?stream=true&token= HTTP/1.1" 200 154 0.212377
Exception in thread Thread-7:
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/Users/lakindugunasekara/Library/Python/2.7/lib/python/site-packages/rasa_core/channels/console.py", line 110, in record_messages
    for response in bot_responses:
  File "/Users/lakindugunasekara/Library/Python/2.7/lib/python/site-packages/rasa_core/channels/console.py", line 67, in send_message_receive_stream
    stream=True) as r:
AttributeError: __exit__

What could go wrong in this code?

PravinrajV commented 5 years ago

I am getting the same error.

vigneshp826 commented 5 years ago

me as well :(

JustinaPetr commented 5 years ago

Hey @lakindu95 I am guessing this has to do something with Python 2.7. I would suggest running it in virtual env with python 3.6 and checking if the issues persists

lakindu95 commented 5 years ago

Thanks for the reply @JustinaPetr In Pytohn 3.6, The published Rasa Core pip installation doesn't work directly. There is an incompatibility issue with Tensorflow 0.10 version. How ever if you install the github repo, removing the version for Tensorflow, it's working.

How ever regarding this issue, I tried using the starter pack https://github.com/RasaHQ/starter-pack-rasa-stack

And it works fine with python 2.7 well.

lakindu95 commented 5 years ago

Closing this issue and referring to the duplicate issue. #17

vigneshp826 commented 5 years ago

Hey @lakindu95 I am guessing this has to do something with Python 2.7. I would suggest running it in virtual env with python 3.6 and checking if the issues persists

@JustinaPetr am using Python-3.5, but getting the same error.

vigneshp826 commented 5 years ago

Thanks for the reply @JustinaPetr In Pytohn 3.6, The published Rasa Core pip installation doesn't work directly. There is an incompatibility issue with Tensorflow 0.10 version. How ever if you install the github repo, removing the version for Tensorflow, it's working.

How ever regarding this issue, I tried using the starter pack https://github.com/RasaHQ/starter-pack-rasa-stack

And it works fine with python 2.7 well.

Hi @lakindu95 , can you pls explain more on how you resolved this issue neglecting the Starter-pack-rasa-stack project.

antoinecomp commented 5 years ago

@vigneshp826 Maybe start using Python3.6 as suggested by Justina?

vigneshp826 commented 5 years ago

@antoinecomp thank you for your reply. actually my issue solved by unsetting proxy details.

https://github.com/JustinaPetr/Weatherbot_Tutorial/issues/17#issuecomment-431326931