weatherbot_tutorial's Introduction
weatherbot_tutorial's People
Forkers
mkram shafiahmed bryankimani geojolly sandeepsuthari crawling-king glebapaulina saurabhsingh13no dchou shivbaj rp12 vipinsonu1 nahidalam deepakmalik2225 antoinecomp harish-vnkt rahulghag r4sn4 carlosjosecazares ankitgsa amandalmia14 sushinke anshi2i dilankadias coco-egaliciar ashhadulislam archanapradeep allankiplangat useready-andyv nada-baili james-jr-sc flappy007 willvlad balaji-ranga poovarasanvasudevan harshvshah nabti kawtherouenniche hiiamcong sagar-gi banda13 faadal vishnuboyatailor shiva16 rautsunil simon-potter jasperlee27 bigleeuk oldmonkaba kartsingh praneesh12 ak5hay3010 tiagojulianoferreira vigneshp826 raistef octalxia asaiyed10 ranjan-sumit abdelrahmanradwan frederikschorr vyasbhavyesh michamich kaiseryang1224 jkorelc rohitjun08 lakindu95 vibi007 fahim-ahmed mikebitsoko piyushsharma1812 chrismartinezb ilanosm f2015537 wesllenalves lumierra akarsh97 deepsole so2toll venky252003 danorjuela mejihero hd016 anubhavkulshrestha desims 12345k hossamemam95 denizumutdrl ginniinsa jbaynhamuk warrierrajeev akilesh96 alabarga kparhi42 chuash sophiakeyner johannakindt rmdimran sahiliem shalini187 laurapergeweatherbot_tutorial's Issues
Dialogue_management_model.py runtime error
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?
ValueError: 'action_weather' is not in list
"Available actions are: \n{}".format(action_name, action_names))
Exception: Can not access action 'action_weather', as that name is not a registered action for this domain. Available a
- action_listen
- action_restart
- action_default_fallback
- utter_greet
- utter_goodbye
- utter_ask_location
- actions.ActionWeather
Issue about did not find expected '-' indicator in "<unicode string>", line 22, column 3
I encountered below issue whenever I execute dialogue_management_model.py or train_online.py:
node = self.composer.get_single_node()
File "_ruamel_yaml.pyx", line 706, in _ruamel_yaml.CParser.get_single_node (ext/_ruamel_yaml.c:9612)
File "_ruamel_yaml.pyx", line 724, in _ruamel_yaml.CParser._compose_document (ext/_ruamel_yaml.c:9922)
File "_ruamel_yaml.pyx", line 775, in _ruamel_yaml.CParser._compose_node (ext/_ruamel_yaml.c:10814)
File "_ruamel_yaml.pyx", line 889, in _ruamel_yaml.CParser._compose_mapping_node (ext/_ruamel_yaml.c:12609)
File "_ruamel_yaml.pyx", line 775, in _ruamel_yaml.CParser._compose_node (ext/_ruamel_yaml.c:10814)
File "_ruamel_yaml.pyx", line 889, in _ruamel_yaml.CParser._compose_mapping_node (ext/_ruamel_yaml.c:12609)
File "_ruamel_yaml.pyx", line 773, in _ruamel_yaml.CParser._compose_node (ext/_ruamel_yaml.c:10784)
File "_ruamel_yaml.pyx", line 852, in _ruamel_yaml.CParser._compose_sequence_node (ext/_ruamel_yaml.c:12033)
File "_ruamel_yaml.pyx", line 904, in _ruamel_yaml.CParser._parse_next_event (ext/_ruamel_yaml.c:12818)
ruamel.yaml.parser.ParserError: while parsing a block collection
in "", line 19, column 3
did not find expected '-' indicator
in "", line 22, column 3
Errors when running python nlu_model.py
I got below errors when I was running python nlu_model.py on my local. I installed the dependencies in the "Full Code [Latest release of Rasa NLU and Rasa Core]" requirements.txt. What's wrong here?
RuntimeError: module compiled against API version 0xc but this version of numpy is 0xb
ImportError: numpy.core.multiarray failed to import
ImportError: numpy.core.umath failed to import
ImportError: numpy.core.umath failed to import
2018-12-17 17:19:22.428015: F tensorflow/python/lib/core/bfloat16.cc:675] Check failed: PyBfloat16_Type.tp_base != nullptr
Abort trap: 6
AttributeError: module 'rasa_core.training.online' has no attribute 'run_online_learning'
When i start model training using train_online.py I am getting error specified below:
AttributeError Traceback (most recent call last)
in ()
logging.basicConfig(level="INFO")
nlu_interpreter = RasaNLUInterpreter('./models/nlu/default/weathernlu')
---> run_weather_online(nlu_interpreter)
in run_weather_online(interpreter, domain_file, training_data_file)
epochs=200,
max_training_samples=300)
---> online.run_online_learning(agent)
return agent
AttributeError: module 'rasa_core.training.online' has no attribute 'run_online_learning'
Issue in latest release of rasa_core dialogue_management_model.py
I'm using the following version of rasa-core 0.11.3, rasa-nlu 0.13.3, python 3.6.4, in windows 10 x64bitOS,
When i'm running dialogue_management_model.py after this command "python -m rasa_core_sdk.endpoin -actions actions", i got the following error
Epoch 300/300
31/31 [==============================] - 0s 97us/step - loss: 0.2635 - acc: 0.9677 - val_loss: 0.2599 - val_acc: 1.0000
C:\ProgramData\Anaconda3\lib\site-packages\rasa_nlu\extractors\entity_synonyms.py:85: UserWarning: Failed to load synonyms file from './models/nlu/default/weathernlu\entity_synonyms.json'
"".format(entity_synonyms_file))
C:\ProgramData\Anaconda3\lib\site-packages\pykwalify\core.py:100: UnsafeLoaderWarning:
The default 'Loader' for 'load(stream)' without further arguments can be unsafe.
Use 'load(stream, Loader=ruamel.yaml.Loader)' explicitly if that is OK.
Alternatively include the following in your code:
import warnings
warnings.simplefilter('ignore', ruamel.yaml.error.UnsafeLoaderWarning)
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):
hi
Exception in thread Thread-8:
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\threading.py", line 916, in _bootstrap_inner
self.run()
File "C:\ProgramData\Anaconda3\lib\threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\rasa_core\channels\console.py", line 110, in record_messages
for response in bot_responses:
File "C:\ProgramData\Anaconda3\lib\site-packages\rasa_core\channels\console.py", line 67, in send_message_receive_stream
stream=True) as r:
AttributeError: enter
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site-packages\gevent\pywsgi.py", line 936, in handle_one_response
self.run_application()
File "C:\ProgramData\Anaconda3\lib\site-packages\gevent\pywsgi.py", line 910, in run_application
self.process_result()
File "C:\ProgramData\Anaconda3\lib\site-packages\gevent\pywsgi.py", line 896, in process_result
self.write(data)
File "C:\ProgramData\Anaconda3\lib\site-packages\gevent\pywsgi.py", line 742, in write
self._write_with_headers(data)
File "C:\ProgramData\Anaconda3\lib\site-packages\gevent\pywsgi.py", line 764, in _write_with_headers
self._write(data)
File "C:\ProgramData\Anaconda3\lib\site-packages\gevent\pywsgi.py", line 724, in _write
self._sendall(data)
File "C:\ProgramData\Anaconda3\lib\site-packages\gevent\pywsgi.py", line 702, in _sendall
self.socket.sendall(data)
File "C:\ProgramData\Anaconda3\lib\site-packages\gevent_socket3.py", line 418, in sendall
data_sent += self.send(data_memory[data_sent:], flags)
File "C:\ProgramData\Anaconda3\lib\site-packages\gevent_socket3.py", line 391, in send
return _socket.socket.send(self._sock, data, flags)
ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine
Wed Sep 19 11:13:24 2018 {'REMOTE_ADDR': '127.0.0.1', 'REMOTE_PORT': '52203', 'HTTP_HOST': 'localhost:5005', (hidden keys: 23)} failed with ConnectionAbortedError
Storing conversations
Hi Justina,
I scratching my head trying to figure out how to store a conversation with a user once the conversation is over.
Could you help with that?
Thanks
Getting issue running nlu_model
Hi, I am getting the following error, when running the nlu_model.py (Python 3.7)
Traceback (most recent call last): File "nlu_model.py", line 18, in <module> run_nlu() File "nlu_model.py", line 14, in run_nlu print(interpreter.parse("I am planning my holiday to Lithuania. I wonder what is the weather out there.")) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/rasa_nlu/model.py", line 357, in parse component.process(message, **self.context) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/rasa_nlu/classifiers/sklearn_intent_classifier.py", line 176, in process intents = self.transform_labels_num2str(intent_ids) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/rasa_nlu/classifiers/sklearn_intent_classifier.py", line 112, in transform_labels_num2str return self.le.inverse_transform(y) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/sklearn/preprocessing/label.py", line 273, in inverse_transform y = column_or_1d(y, warn=True) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/sklearn/utils/validation.py", line 788, in column_or_1d raise ValueError("bad input shape {0}".format(shape)) ValueError: bad input shape (1, 3)
Anyone gives the idea what am I missing?
UPDATE
I checked this error is not giving on python 3.6
Any issue to be solved with python 3.7?
Unsupported pickle protocol
I'm getting the following error when I run train_online.py file:
"ValueError: unsupported pickle protocol: 3"
Please let me know if there is any solution for this.
python nlu_model.py gives an error
The following error is thrown:-
TypeError: Argument 'string' has incorrect type (expected unicode, got str)
TypeError: <rasa_core.events.AllSlotsReset object at 0x0000019E62DFE4A8> is not JSON serializable
Rasa Core version: 0.11.3
Python version: Python 3.6.5
Operating system (windows, osx, ...): windows 10
Issue:
I configured a custom action to automatically reset slots and restart conversation after a story ends, but whenever I call this action, below error appears:
====Log from training script:=============
ERROR:rasa_core.actions.action:Failed to run custom action 'action_slot_reset'. Action server responded with a non 200 status code of 500. Make sure your action server properly runs actions and returns a 200 once the action is executed. Error: 500 Server Error: INTERNAL SERVER ERROR for url: http://localhost:5055/webhook
ERROR:rasa_core.processor:Encountered an exception while running action 'action_slot_reset'. Bot will continue, but the actions events are lost. Make sure to fix the exception in your custom code.
ERROR:rasa_core.processor:Failed to execute custom action.
Traceback (most recent call last):
File "C:\Users\namnt\AppData\Local\Programs\Python\Python36\lib\site-packages\rasa_core\actions\action.py", line 313, in run
response.raise_for_status()
File "C:\Users\namnt\AppData\Local\Programs\Python\Python36\lib\site-packages\requests\models.py", line 939, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: INTERNAL SERVER ERROR for url: http://localhost:5055/webhook
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\namnt\AppData\Local\Programs\Python\Python36\lib\site-packages\rasa_core\processor.py", line 319, in _run_action
events = action.run(dispatcher, tracker, self.domain)
File "C:\Users\namnt\AppData\Local\Programs\Python\Python36\lib\site-packages\rasa_core\actions\action.py", line 334, in run
raise Exception("Failed to execute custom action.")
Exception: Failed to execute custom action.
127.0.0.1 - - [2018-10-22 09:28:26] "POST /conversations/default/execute HTTP/1.1" 200 4045 1.070108
127.0.0.1 - - [2018-10-22 09:28:27] "POST /conversations/default/predict HTTP/1.1" 200 13943 0.020988
====Log from running custom action server:===
INFO:main:Starting action endpoint server...
INFO:rasa_core_sdk.executor:Registered function for 'action_restarted'.
INFO:rasa_core_sdk.executor:Registered function for 'action_slot_reset'.
INFO:main:Action endpoint is up and running. on ('0.0.0.0', 5055)
DEBUG:rasa_core_sdk.executor:Received request to run 'action_slot_reset'
DEBUG:rasa_core_sdk.executor:Successfully ran 'action_slot_reset'
ERROR:flask.app:Exception on /webhook [POST]
Traceback (most recent call last):
File "C:\Users\namnt\AppData\Local\Programs\Python\Python36\lib\site-packages\flask\app.py", line 2292, in wsgi_app
response = self.full_dispatch_request()
File "C:\Users\namnt\AppData\Local\Programs\Python\Python36\lib\site-packages\flask\app.py", line 1815, in full_dispatch_request
rv = self.handle_user_exception(e)
File "C:\Users\namnt\AppData\Local\Programs\Python\Python36\lib\site-packages\flask_cors\extension.py", line 161, in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
File "C:\Users\namnt\AppData\Local\Programs\Python\Python36\lib\site-packages\flask\app.py", line 1718, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "C:\Users\namnt\AppData\Local\Programs\Python\Python36\lib\site-packages\flask_compat.py", line 35, in reraise
raise value
File "C:\Users\namnt\AppData\Local\Programs\Python\Python36\lib\site-packages\flask\app.py", line 1813, in full_dispatch_request
rv = self.dispatch_request()
File "C:\Users\namnt\AppData\Local\Programs\Python\Python36\lib\site-packages\flask\app.py", line 1799, in dispatch_request
return self.view_functionsrule.endpoint
File "C:\Users\namnt\AppData\Local\Programs\Python\Python36\lib\site-packages\flask_cors\decorator.py", line 128, in wrapped_function
resp = make_response(f(*args, **kwargs))
File "C:\Users\namnt\AppData\Local\Programs\Python\Python36\lib\site-packages\rasa_core_sdk\endpoint.py", line 74, in webhook
return jsonify(response)
File "C:\Users\namnt\AppData\Local\Programs\Python\Python36\lib\site-packages\flask\json_init_.py", line 321, in jsonify
dumps(data, indent=indent, separators=separators) + '\n',
File "C:\Users\namnt\AppData\Local\Programs\Python\Python36\lib\site-packages\flask\json_init_.py", line 179, in dumps
rv = json.dumps(obj, **kwargs)
File "C:\Users\namnt\AppData\Local\Programs\Python\Python36\lib\site-packages\simplejson_init.py", line 397, in dumps
**kw).encode(obj)
File "C:\Users\namnt\AppData\Local\Programs\Python\Python36\lib\site-packages\simplejson\encoder.py", line 291, in encode
chunks = self.iterencode(o, _one_shot=True)
File "C:\Users\namnt\AppData\Local\Programs\Python\Python36\lib\site-packages\simplejson\encoder.py", line 373, in iterencode
return iterencode(o, 0)
File "C:\Users\namnt\AppData\Local\Programs\Python\Python36\lib\site-packages\flask\json_init.py", line 81, in default
return _json.JSONEncoder.default(self, o)
File "C:\Users\namnt\AppData\Local\Programs\Python\Python36\lib\site-packages\simplejson\encoder.py", line 268, in default
raise TypeError(repr(o) + " is not JSON serializable")
TypeError: <rasa_core.events.AllSlotsReset object at 0x0000019E62DFE4A8> is not JSON serializable
127.0.0.1 - - [2018-10-22 09:28:26] "POST /webhook HTTP/1.1" 500 412 0.036980
===actionsEVN.py:===
from rasa_core.events import AllSlotsReset
from rasa_core.events import Restarted
from rasa_core_sdk import Action
class ActionRestarted(Action):
def name(self):
return 'action_restarted'
def run(self, dispatcher, tracker, domain):
return [Restarted()]
class ActionSlotReset(Action):
def name(self):
return 'action_slot_reset'
def run(self, dispatcher, tracker, domain):
return [AllSlotsReset()]
Content of endpoint file:
action_endpoint:
url: "http://localhost:5055/webhook/"
script training online I used:
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import logging
import json
from rasa_core.agent import Agent
from rasa_core.policies.keras_policy import KerasPolicy
from rasa_core.policies.memoization import MemoizationPolicy
from rasa_core.policies.fallback import FallbackPolicy
from rasa_core.interpreter import RasaNLUInterpreter
from rasa_core.train import online
from rasa_core.utils import EndpointConfig
logger = logging.getLogger(__name__)
fallback = FallbackPolicy(fallback_action_name="utter_unclear",
core_threshold=0.2,
nlu_threshold=0.6)
def run_EVN_online(interpreter,
domain_file="EVN_domain.yml",
training_data_file='data/storiesEVN.md'):
action_endpoint = EndpointConfig(url="http://localhost:5055/webhook")
agent = Agent(domain_file,
policies=[fallback,
MemoizationPolicy(max_history=5),
KerasPolicy()],
interpreter=interpreter,
action_endpoint=action_endpoint)
data = agent.load_data(training_data_file)
agent.train(data,
batch_size=50,
epochs=30,
max_training_samples=500)
online.serve_agent(agent)
return agent
if __name__ == '__main__':
logging.basicConfig(level="INFO")
nlu_interpreter = RasaNLUInterpreter('./models/nlu/default/EVNHANOI')
run_EVN_online(nlu_interpreter)
rasa_slack_connector.py vs from rasa_core.channels.slack import SlackInput
Is there a reason you wrote a slightly different version of the rasa slack connector?
I believe your SlackBot
class needs to implement additional methods in order to handle button functionality, correct?
However, I cannot get the rasa_core.channels.slack SlackBot and SlackInput to work - your classes seem to require additional slack tokens that the former is missing.
Can you explain why you re-implemented your class and what methods must be implemented to add button functionality?
Thanks :)
500 INTERNAL SERVER ERROR
Ubuntu 18
ERROR:rasa_core.processor:Encountered an exception while running action 'action_weather'. Bot will continue, but the actions events are lost. Make sure to fix the exception in your custom code.
ERROR:rasa_core.processor:500 Server Error: INTERNAL SERVER ERROR for url: http://localhost:5055/webhook
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/rasa_core/processor.py", line 324, in _run_action
events = action.run(dispatcher, tracker, self.domain)
File "/usr/local/lib/python3.5/dist-packages/rasa_core/actions/action.py", line 312, in run
response.raise_for_status()
File "/usr/local/lib/python3.5/dist-packages/requests/models.py", line 928, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: INTERNAL SERVER ERROR for url: http://localhost:5055/webhook
model version your using is to old to be loaded by this Rasa NLU instance
Hi ! I just watch your video and wanted to test your model. Unfortunately when I tried to launch dialogue_management_model I had an issue I am also facing : model version your using is to old to be loaded by this Rasa NLU instance.
(envMoodbot2) mike@mike-thinks:~/Programing/Rasa_tutorial/Weatherbot_Tutorial/Full Code$ python dialogue_management_model.py
...
rasa_nlu.model.UnsupportedModelError:
The model version is to old to be loaded by this Rasa NLU instance.
Either retrain the model, or run withan older version.
Model version: 0.11.0 Instance version: 0.12.3
Do you know how to cope with it ?
np.floating depricated
python3 train_online.py
/Users/atodorov/Desktop/Work/Weatherbot_Tutorial/Full Code [Latest release of Rasa NLU and Rasa Core]/rasa/lib/python3.6/site-packages/h5py/init.py:34: FutureWarning: Conversion of the second argument of issubdtype from float
to np.floating
is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type
.
from ._conv import register_converters as _register_converters
Traceback (most recent call last):
File "train_online.py", line 12, in
from rasa_core.train import online
ImportError: cannot import name 'online'
Import error - rasa_nlu converters
I'm getting this error when I try to run the nlu_model.py
C:\Weatherbot>python nlu_model.py
Traceback (most recent call last):
File "nlu_model.py", line 1, in <module>
from rasa_nlu.converters import load_data
ImportError: No module named 'rasa_nlu.converters'
running command python train_init.py ends in RunTime issue
When i try to train the model using train_init.py, i got the below error. Could you please help with this problem. ?
$ python train_init.py
Using TensorFlow backend.
RuntimeError: module compiled against API version 0xc but this version of numpy is 0xb
ImportError: numpy.core.multiarray failed to import
ImportError: numpy.core.umath failed to import
ImportError: numpy.core.umath failed to import
2018-10-24 14:44:58.078003: F tensorflow/python/lib/core/bfloat16.cc:675] Check failed: PyBfloat16_Type.tp_base != nullptr
I have python version 3.6.4 and in requirement txt i have numpy version as numpy==1.13.1 as like in github your project.
issue while running train_online.py
Hello there,
I am getting the following error, when running the train_online.py
abrarahmed@abrarahmed-HP-Notebook:~/Weatherbot_Tutorial-master/Full Code [Latest release of Rasa NLU and Rasa Core]$ python3 train_online.py
Traceback (most recent call last):
File "train_online.py", line 12, in
from rasa_core.train import online
ImportError: cannot import name 'online'
What can I do about that?
Thank you
No Response when running nlu_model.py
OS: Windows
When I am running the command "python nlu_model.py", the anaconda prompt is not responding anything.
It is not giving any error, nor it is giving back any compilation message, as shown in the video.
I have installed everything and all installations are successful, I am following your video for implementation.
how to connect this rasa from my react project
instead of connecting to slack i want to send and receive messages from my react app , what is the api to connect from my react app
Your URL didn't respond with the value of the challenge parameter
I am getting 'Your URL didn't respond with the value of the challenge parameter' in slack.
I have passed the verification code in run_app.py and in the slack i passed https://'ngrok_url/slack/events/.Can you please help me with this.
Thanks
@JustinaPetr
When I use the Latest code I got an error
ImportError: cannot import name 'load_data'
Issue with integration between Rasa with slack
Hi,
Many thanks for the video and the code, It was really helpful
I used your code and able to run to execute as Rest server
When I want to integrate My bot with Slack,I tried using run.py ( from teh [Latest release of Rasa NLU and Rasa Core]
But When I run the file and see the console only below part is getting displayed
Can you help me with sample code to open Slack Channel and integrate my bot with slack
data entry in config_spacy.json
I am wondering why this data entry was used here. It seems to be a) not relevant or b) missing in the docs
Thanks for the answer :)
passing `featurizer` and `max_history` to `agent.train(...)` is not supported anymore.
I get this error when I try to run python train_init.py. Please help!!
>python train_init.py
Using TensorFlow backend.
Traceback (most recent call last):
File "train_init.py", line 25, in <module>
validation_split = 0.2)
File "C:\miniconda\lib\site-packages\rasa_core\agent.py", line 243, in train
raise Exception("Passing `featurizer` and `max_history` "
Exception: Passing `featurizer` and `max_history` to `agent.train(...)` is not supported anymore. Pass appropriate featurizer directly to the policy instead. More info https://core.rasa.com/migrations.html#x-to-0-9-0
slot = slot_class(slot_name, **slot_dict[slot_name]) TypeError: __init__() got an unexpected keyword argument 'auto_fill'
C:\ProgramData\Anaconda3\lib\site-packages\rasa_nlu\extractors\entity_synonyms.py:85: UserWarning: Failed to load synonyms file from 'D:\Weatherbot_Tutorial-master\Full Code [Latest release of Rasa NLU and Rasa Core]\models\default\weathernlu\entity_synonyms.json'
"".format(entity_synonyms_file))
C:\ProgramData\Anaconda3\lib\site-packages\pykwalify\core.py:99: UnsafeLoaderWarning:
The default 'Loader' for 'load(stream)' without further arguments can be unsafe.
Use 'load(stream, Loader=ruamel.yaml.Loader)' explicitly if that is OK.
Alternatively include the following in your code:
import warnings
warnings.simplefilter('ignore', ruamel.yaml.error.UnsafeLoaderWarning)
In most other cases you should consider using 'safe_load(stream)'
data = yaml.load(stream)
Traceback (most recent call last):
File "", line 10, in
agent = Agent.load('D:\Weatherbot_Tutorial-master\Full Code [Latest release of Rasa NLU and Rasa Core]\models\dialogue', interpreter = nlu_interpreter, action_endpoint = action_endpoint)
File "C:\ProgramData\Anaconda3\lib\site-packages\rasa_core\agent.py", line 262, in load
domain = Domain.load(os.path.join(path, "domain.yml"))
File "C:\ProgramData\Anaconda3\lib\site-packages\rasa_core\domain.py", line 89, in load
return cls.from_yaml(read_file(filename))
File "C:\ProgramData\Anaconda3\lib\site-packages\rasa_core\domain.py", line 95, in from_yaml
return cls.from_dict(data)
File "C:\ProgramData\Anaconda3\lib\site-packages\rasa_core\domain.py", line 100, in from_dict
slots = cls.collect_slots(data.get("slots", {}))
File "C:\ProgramData\Anaconda3\lib\site-packages\rasa_core\domain.py", line 143, in collect_slots
slot = slot_class(slot_name, **slot_dict[slot_name])
TypeError: init() got an unexpected keyword argument 'auto_fill'
Latest Directory missing train_init.py file
impossible for RasaNLUInterpreter to read the .pkl extension files
Rasa Core version:
(MoodbotEnv) mike@mike-thinks:~/Programing/Rasa_tutorial/moodbot4$ pip list :
...
rasa-core (0.9.0a3)
rasa-nlu (0.12.3)
Python version:
(MoodbotEnv) mike@mike-thinks:~/Programing/Rasa_tutorial/moodbot4$ python -V
Python 3.5.2
Operating system : Linux 16.04
Issue:
When trying to launch file train_online.py
, the actual conversation chatbot able to send messages, there were issues
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import logging
from rasa_core.agent import Agent
from rasa_core.channels.console import ConsoleInputChannel
from rasa_core.interpreter import RegexInterpreter
from rasa_core.policies.keras_policy import KerasPolicy
from rasa_core.policies.memoization import MemoizationPolicy
from rasa_core.interpreter import RasaNLUInterpreter
logger = logging.getLogger(__name__)
def run_weather_online(input_channel, interpreter,
domain_file="weather_domain.yml",
training_data_file='data/stories.md'):
agent = Agent(domain_file,
policies=[MemoizationPolicy(), KerasPolicy()],
interpreter=interpreter)
agent.train_online(training_data_file,
input_channel=input_channel,
max_history=2,
batch_size=50,
epochs=200,
max_training_samples=300)
return agent
if __name__ == '__main__':
logging.basicConfig(level="INFO")
nlu_interpreter = RasaNLUInterpreter('./models/nlu/default/weathernlu')
run_weather_online(ConsoleInputChannel(), nlu_interpreter)
Yet the following error appeared :
(MoodbotEnv) mike@mike-thinks:~/Programing/Rasa_tutorial/moodbot4$ python train_online.py
INFO:rasa_nlu.components:Added 'nlp_spacy' to component cache. Key 'nlp_spacy-en'.
Traceback (most recent call last):
File "/home/mike/Programing/Rasa_tutorial/moodbot4/MoodbotEnv/lib/python3.5/site-packages/sklearn/externals/joblib/numpy_pickle.py", line 508, in _unpickle
obj = unpickler.load()
File "/usr/lib/python3.5/pickle.py", line 1039, in load
dispatch[key[0]](self)
File "/usr/lib/python3.5/pickle.py", line 1177, in load_binstring
self.append(self._decode_string(data))
File "/usr/lib/python3.5/pickle.py", line 1159, in _decode_string
return value.decode(self.encoding, self.errors)
UnicodeDecodeError: 'ascii' codec can't decode byte 0x89 in position 36: ordinal not in range(128)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "train_online.py", line 37, in <module>
nlu_interpreter = RasaNLUInterpreter('./models/nlu/default/weathernlu')
File "/home/mike/Programing/Rasa_tutorial/moodbot4/MoodbotEnv/lib/python3.5/site-packages/rasa_core/interpreter.py", line 221, in __init__
self._load_interpreter()
File "/home/mike/Programing/Rasa_tutorial/moodbot4/MoodbotEnv/lib/python3.5/site-packages/rasa_core/interpreter.py", line 237, in _load_interpreter
self.interpreter = Interpreter.load(self.model_directory)
File "/home/mike/Programing/Rasa_tutorial/moodbot4/MoodbotEnv/lib/python3.5/site-packages/rasa_nlu/model.py", line 276, in load
skip_validation)
File "/home/mike/Programing/Rasa_tutorial/moodbot4/MoodbotEnv/lib/python3.5/site-packages/rasa_nlu/model.py", line 303, in create
model_metadata, **context)
File "/home/mike/Programing/Rasa_tutorial/moodbot4/MoodbotEnv/lib/python3.5/site-packages/rasa_nlu/components.py", line 398, in load_component
cached_component, **context)
File "/home/mike/Programing/Rasa_tutorial/moodbot4/MoodbotEnv/lib/python3.5/site-packages/rasa_nlu/registry.py", line 131, in load_component_by_name
return component_clz.load(model_dir, metadata, cached_component, **kwargs)
File "/home/mike/Programing/Rasa_tutorial/moodbot4/MoodbotEnv/lib/python3.5/site-packages/rasa_nlu/extractors/crf_entity_extractor.py", line 313, in load
ent_tagger = joblib.load(model_file)
File "/home/mike/Programing/Rasa_tutorial/moodbot4/MoodbotEnv/lib/python3.5/site-packages/sklearn/externals/joblib/numpy_pickle.py", line 578, in load
obj = _unpickle(fobj, filename, mmap_mode)
File "/home/mike/Programing/Rasa_tutorial/moodbot4/MoodbotEnv/lib/python3.5/site-packages/sklearn/externals/joblib/numpy_pickle.py", line 523, in _unpickle
raise new_exc
ValueError: You may be trying to read with python 3 a joblib pickle generated with python 2. This feature is not supported by joblib.
I know it means that compatibility across python versions is not fully supported but I don't understand why and what can I do to cope with it.
Just to inform myself I tried to launch the code using Python 2 explicitly : and it gave me :
(MoodbotEnv) mike@mike-thinks:~/Programing/Rasa_tutorial/moodbot4$ python2 train_online.py
Traceback (most recent call last):
File "train_online.py", line 37, in <module>
nlu_interpreter = RasaNLUInterpreter('./models/nlu/default/weathernlu')
File "/home/mike/.local/lib/python2.7/site-packages/rasa_core/interpreter.py", line 219, in __init__
self._load_interpreter()
File "/home/mike/.local/lib/python2.7/site-packages/rasa_core/interpreter.py", line 234, in _load_interpreter
from rasa_nlu.config import RasaNLUConfig
ImportError: cannot import name RasaNLUConfig
Which is an issue they already dealt with here but which is unexpected as far as my rasa-core version is one of the latest.
I think the problem is either RasaNLUInterpreter module has changed for another here or it is impossible for RasaNLUInterpreter to read the .pkl
extension files :
(envMoodbot2) mike@mike-thinks:~/Programing/Rasa_tutorial/moodbot4/models/nlu/default/weathernlu$ ls
crf_model.pkl intent_classifier_sklearn.pkl metadata.json training_data.json
Content of domain file :
action_factory: null
action_names:
- utter_greet
- utter_goodbye
- utter_ask_location
- action_weather
actions:
- utter_greet
- utter_goodbye
- utter_ask_location
- actions.ActionWeather
config:
store_entities_as_slots: true
entities:
- location
intents:
- greet
- goodbye
- inform
slots:
location:
initial_value: null
type: rasa_core.slots.TextSlot
templates:
utter_ask_location:
- text: In what location?
utter_goodbye:
- text: Talk to you later.
- text: Bye bye :(
utter_greet:
- text: Hello! How can I help?
topics: []
Issue while running train online
I am getting the below error while running the train online program
INFO:rasa_core.policies.keras_policy:Done fitting keras policy model
INFO:rasa_core.training.online:Rasa Core server is up and running on http://localhost:5005
Bot loaded. Type a message and press enter (use '/stop' to exit).
ERROR:rasa_core.training.online:An exception occurred while recording messages.
Traceback (most recent call last):
File "C:\Users\ssujith5\AppData\Local\Programs\Python\Python35\lib\site-packages\rasa_core\training\online.py", line 845, in record_messages
domain = retrieve_domain(endpoint)
File "C:\Users\ssujith5\AppData\Local\Programs\Python\Python35\lib\site-packages\rasa_core\training\online.py", line 109, in retrieve_domain
return _response_as_json(r)
File "C:\Users\ssujith5\AppData\Local\Programs\Python\Python35\lib\site-packages\rasa_core\training\online.py", line 62, in _response_as_json
response.raise_for_status()
File "C:\Users\ssujith5\AppData\Local\Programs\Python\Python35\lib\site-packages\requests\models.py", line 939, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 504 Server Error: Gateway Timeout for url: http://localhost:5005/domain
I am using the endpoint
action_endpoint = EndpointConfig(url="http://localhost:5005/webhook")
as is given in the code.
issue while running dialogue_management_model.py
We followed https://jpboost.com/2018/02/06/creating-a-chatbot-with-rasa-nlu-and-rasa-core/
when we try to run dialogue_management_model we are facing below issue
/chatbot/sample/weatherbot2/local/lib/python2.7/site-packages/rasa_nlu/extractors/entity_synonyms.py:85: UserWarning: Failed to load synonyms file from '/home/user/work/projects/chatbot/sample/models/nlu/default/weathernlu/entity_synonyms.json'
"".format(entity_synonyms_file))
Bot loaded. Type a message and press enter (use '/stop' to exit):
hai
/home/user/work/projects/chatbot/sample/weatherbot2/local/lib/python2.7/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-8:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "/home/user/work/projects/chatbot/sample/weatherbot2/local/lib/python2.7/site-packages/rasa_core/channels/console.py", line 110, in record_messages
for response in bot_responses:
File "/home/user/work/projects/chatbot/sample/weatherbot2/local/lib/python2.7/site-packages/rasa_core/channels/console.py", line 67, in send_message_receive_stream
stream=True) as r:
AttributeError: exit
127.0.0.1 - - [2018-09-18 17:15:03] "POST /webhooks/rest/webhook?stream=true&token= HTTP/1.1" 200 153 0.175675
Traceback (most recent call last):
File "/usr/lib/python2.7/multiprocessing/queues.py", line 268, in _feed
send(obj)
IOError: [Errno 32] Broken pipe
Any idea about this issue??
Entities cannot be identified by rasa nlu
facebook Channel error
Hi,
I was working with telegram channel for a while with no issues.
Then I decided to get a try to facebook channel, I did setup ngrok with no issues but I am getting this error when iniciate a chat from messenger in my phone
.......
File "/home/python/anaconda3/envs/bot36/lib/python3.6/site-packages/rasa_core/channels/facebook.py", line 62, in message
self._handle_user_message(text, self.get_user_id())
File "/home/python/anaconda3/envs/bot36/lib/python3.6/site-packages/rasa_core/channels/facebook.py", line 77, in _handle_user_message
input_channel=self.name())
AttributeError: 'Messenger' object has no attribute 'name'
127.0.0.1 - - [2018-10-03 21:46:01] "POST /webhooks/facebook/webhook HTTP/1.1" 500 444 0.004268
I checked everything 10 times and could not find the issue :(
Thanks
from rasa_core.channels.rest import HttpInputComponent ModuleNotFoundError: No module named 'rasa_core.channels.rest'
for "from rasa_core.channels.rest import HttpInputComponent" python code i am getting following error :"ModuleNotFoundError: No module named 'rasa_core.channels.rest'"
Please suggest some solutions.
Thank
s
how can rasa support multi user dialouge management
say that i have 3 users u1,u2, u3 each one is talking to bot at the same real time
How rasa is maintaining the live dialogue of all three users individually
dialoge mangement model
home/sharma/.local/lib/python2.7/site-packages/h5py/init.py:34: FutureWarning: Conversion of the second argument of issubdtype from float
to np.floating
is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type
.
from ._conv import register_converters as _register_converters
/home/sharma/.local/lib/python2.7/site-packages/pykwalify/core.py:99: UnsafeLoaderWarning:
The default 'Loader' for 'load(stream)' without further arguments can be unsafe.
Use 'load(stream, Loader=ruamel.yaml.Loader)' explicitly if that is OK.
Alternatively include the following in your code:
import warnings
warnings.simplefilter('ignore', ruamel.yaml.error.UnsafeLoaderWarning)
In most other cases you should consider using 'safe_load(stream)'
data = yaml.load(stream)
Processed Story Blocks: 0it [00:00, ?it/s]
Processed Story Blocks: 0it [00:00, ?it/s]
Processed Story Blocks: 0it [00:00, ?it/s]
Processed Story Blocks: 0it [00:00, ?it/s]
/home/sharma/.local/lib/python2.7/site-packages/rasa_core/policies/keras_policy.py:241: UserWarning: Persist called without a trained model present. Nothing to persist then!
warnings.warn("Persist called without a trained model present. "
Traceback (most recent call last):
File "dialogue_management_model.py", line 38, in
run_weather_bot()
File "dialogue_management_model.py", line 31, in run_weather_bot
agent = Agent.load('./models/dialogue', interpreter=interpreter, action_endpoint=action_endpoint)
File "/home/sharma/.local/lib/python2.7/site-packages/rasa_core/agent.py", line 275, in load
ensemble = PolicyEnsemble.load(path) if path else None
File "/home/sharma/.local/lib/python2.7/site-packages/rasa_core/policies/ensemble.py", line 188, in load
policy = policy_cls.load(policy_path)
File "/home/sharma/.local/lib/python2.7/site-packages/rasa_core/policies/keras_policy.py", line 272, in load
"doesn't exist".format(os.path.abspath(path)))
Exception: Failed to load dialogue model. Path /home/sharma/Desktop/chatbot/models/dialogue/policy_1_KerasPolicy doesn't exist
Rasa NLU Entities are not getting identified
I have added four example to identify salary slip (context of payroll) to train my rasa nlu model but the entites on test are not identified
my data.json is as below:
{
"rasa_nlu_data": {
"common_examples": [
{
"text": "Hello",
"intent": "greet",
"entities": []
},
{
"text": "goodbye",
"intent": "goodbye",
"entities": []
},
{
"text": "What's the weather in Berlin at the moment?",
"intent": "inform",
"entities": [
{
"start": 22,
"end": 28,
"value": "Berlin",
"entity": "location"
}
]
},
{
"text": "hey",
"intent": "greet",
"entities": []
},
{
"text": "hello",
"intent": "greet",
"entities": []
},
{
"text": "hi",
"intent": "greet",
"entities": []
},
{
"text": "heya",
"intent": "greet",
"entities": []
},
{
"text": "howdy",
"intent": "greet",
"entities": []
},
{
"text": "hey there",
"intent": "greet",
"entities": []
},
{
"text": "bye",
"intent": "goodbye",
"entities": []
},
{
"text": "goodbye",
"intent": "goodbye",
"entities": []
},
{
"text": "bye bye",
"intent": "goodbye",
"entities": []
},
{
"text": "see ya",
"intent": "goodbye",
"entities": []
},
{
"text": "see you later",
"intent": "goodbye",
"entities": []
},
{
"text": "What's the weather today?",
"intent": "inform",
"entities": []
},
{
"text": "What's the weather in London today?",
"intent": "inform",
"entities": [
{
"start": 22,
"end": 28,
"value": "London",
"entity": "location"
}
]
},
{
"text": "Show me what's the weather in Paris",
"intent": "inform",
"entities": [
{
"start": 30,
"end": 35,
"value": "Paris",
"entity": "location"
}
]
},
{
"text": "I wonder what is the weather in Vilnius right now?",
"intent": "inform",
"entities": [
{
"start": 32,
"end": 39,
"value": "Vilnius",
"entity": "location"
}
]
},
{
"text": "what is the weather?",
"intent": "inform",
"entities": []
},
{
"text": "Tell me the weather",
"intent": "inform",
"entities": []
},
{
"text": "Is the weather nice in Barcelona today?",
"intent": "inform",
"entities": [
{
"start": 23,
"end": 32,
"value": "Barcelona",
"entity": "location"
}
]
},
{
"text": "I am going to London today and I wonder what is the weather out there?",
"intent": "inform",
"entities": [
{
"start": 14,
"end": 20,
"value": "London",
"entity": "location"
}
]
},
{
"text": "I am planning my trip to Amsterdam. What is the weather out there?",
"intent": "inform",
"entities": [
{
"start": 25,
"end": 34,
"value": "Amsterdam",
"entity": "location"
}
]
},
{
"text": "Show me the weather in Dublin, please",
"intent": "inform",
"entities": [
{
"start": 23,
"end": 29,
"value": "Dublin",
"entity": "location"
}
]
},
{
"text": "in London",
"intent": "inform",
"entities": [
{
"start": 3,
"end": 9,
"value": "London",
"entity": "location"
}
]
},
{
"text": "Lithuania",
"intent": "inform",
"entities": [
{
"start": 0,
"end": 9,
"value": "Lithuania",
"entity": "location"
}
]
},
{
"text": "Oh, sorry, in Italy",
"intent": "inform",
"entities": [
{
"start": 14,
"end": 19,
"value": "Italy",
"entity": "location"
}
]
},
{
"text": "Tell me the weather in Vilnius",
"intent": "inform",
"entities": [
{
"start": 23,
"end": 30,
"value": "Vilnius",
"entity": "location"
}
]
},
{
"text": "The weather condition in Italy",
"intent": "inform",
"entities": [
{
"start": 25,
"end": 30,
"value": "Italy",
"entity": "location"
}
]
},
{
"text": "where can i see my salary slip",
"intent": "inform",
"entities": [
{
"start": 19,
"end": 30,
"value": "salary slip",
"entity": "salary slip"
}
]
},
{
"text": "how do i edit details for my salary slip",
"intent": "inform",
"entities": [
{
"start": 29,
"end": 40,
"value": "salary slip",
"entity": "salary slip"
}
]
},
{
"text": "why the no of holidays is less in my salary slip",
"intent": "inform",
"entities": [
{
"start": 37,
"end": 49,
"value": " salary slip",
"entity": "salary slip"
}
]
},
{
"text": "where can i see my salary slip",
"intent": "inform",
"entities": [
{
"start": 19,
"end": 30,
"value": "salary slip",
"entity": "salary slip"
}
]
},
{
"text": "how do i get a cab",
"intent": "inform",
"entities": [
{
"start": 15,
"end": 18,
"value": "car",
"entity": ""
}
]
},
{
"text": "what is the process to change the shift of cab",
"intent": "inform",
"entities": [
{
"start": 43,
"end": 46,
"value": "car",
"entity": ""
}
]
}
]
}
}
and the test result is as below:
{'intent': {'name': 'inform', 'confidence': 0.86433063381427622}, 'entities': [], 'intent_ranking': [{'name': 'inform', 'confidence': 0.86433063381427622}, {'name': 'goodbye', 'confidence': 0.089983588489144922}, {'name': 'greet', 'confidence': 0.045685777696578785}], 'text': 'i am planning to get my salary slip , i wonder how can i get it'}
can you explain why my model is not recognizing the entity salary slip
How to connect with custom web ui using socket.io instead of slack
I just wonder to know about how to connect this bot into custom web UI using socket.io instead of slack.
Thanks
@JustinaPetr
Error while running python dialogue_management_model.py
While running the file gives,
Traceback (most recent call last):
File "train_online.py", line 39, in
run_weather_online(nlu_interpreter)
File "train_online.py", line 32, in run_weather_online
online.serve_agent(agent)
AttributeError: module 'rasa_core.training.online' has no attribute 'serve_agent'
I believe server_agent doesnt exisit in online now
Tensorflow error
I get an error every time I install tensorflow.
Like below
Could not find a version that satisfies the requirement tensorflow (from versions: ) No matching distribution found for tensorflow
Error in dialogue_management_model.py
error in the dialogue management model
ed as np.float64 == np.dtype(float).type
.
from ._conv import register_converters as _register_converters
/home/sharma/.local/lib/python2.7/site-packages/pykwalify/core.py:99: UnsafeLoaderWarning:
The default 'Loader' for 'load(stream)' without further arguments can be unsafe.
Use 'load(stream, Loader=ruamel.yaml.Loader)' explicitly if that is OK.
Alternatively include the following in your code:
import warnings
warnings.simplefilter('ignore', ruamel.yaml.error.UnsafeLoaderWarning)
In most other cases you should consider using 'safe_load(stream)'
data = yaml.load(stream)
Processed Story Blocks: 0it [00:00, ?it/s]
Processed Story Blocks: 0it [00:00, ?it/s]
Processed Story Blocks: 0it [00:00, ?it/s]
Processed Story Blocks: 0it [00:00, ?it/s]
Traceback (most recent call last):
File "dialogue_management_model.py", line 40, in
train_dialogue()
File "dialogue_management_model.py", line 28, in train_dialogue
agent.persist(model_path)
File "/home/sharma/.local/lib/python2.7/site-packages/rasa_core/agent.py", line 594, in persist
self.policy_ensemble.persist(model_path, dump_flattened_stories)
File "/home/sharma/.local/lib/python2.7/site-packages/rasa_core/policies/ensemble.py", line 143, in persist
self._persist_metadata(path, dump_flattened_stories)
File "/home/sharma/.local/lib/python2.7/site-packages/rasa_core/policies/ensemble.py", line 118, in _persist_metadata
self.training_trackers)
File "/home/sharma/.local/lib/python2.7/site-packages/rasa_core/policies/ensemble.py", line 53, in _training_events_from_trackers
for t in training_trackers:
TypeError: 'NoneType' object is not iterable
permission error
When i am running dialogue_managment_model.py , a permission error saying Access is denied: './models/dialogue' is coming
ImportError: cannot import name 'online'
Hi
I am configuring online training..
I am using the lastest version of rasa nlu(13.7) and core(12.7)
I actually copy the code of online training from your latest full code.
And When I run python train_online.py, i got this error:
ImportError: cannot import name 'online'
multiple channel input
Hi Justina,
The bot is working perfect with Slack, and per other topic here it is clear RasaCore is managing the multiple user input.
However, what it we want to have two or three different channels working?
Like facebook, telegram and Slack?
could you please share how the code needs to be changed to support the multiple channel input?
Thanks
Chatbot not loading after running python dialogue_management_model.py
I started the server and ran python dialogue_management_model.py but the chat bot does not load. Any idea what I might be missing?
No response from the bot - AttributeError: __enter__
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
ImportError: No module named _pywrap_tensorflow
Hi if i try to run: python train_init.py i got this error..
ImportError: No module named _pywrap_tensorflow
Failed to load the native TensorFlow runtime.
Weatherbot: Could not run the new version of code to create a custom channel to create widget
I used the Advanced Usage with a custom Rasa Core project as Custom Channel from Python using https://github.com/scalableminds/chatroom as suggested in RASA docs.
I updated the libraries using the new version of weatherbot tutorial, and tried to run the following code 'run_application.py' . The code reference is from https://github.com/scalableminds/chatroom
from rasa_core.channels.slack import SlackInput
from rasa_core.agent import Agent
from rasa_core.interpreter import RasaNLUInterpreter
import yaml
from rasa_core.utils import EndpointConfig
nlu_interpreter = RasaNLUInterpreter('./models/nlu/default/weathernlu')
action_endpoint = EndpointConfig(url="http://localhost:5055/webhook")
agent = Agent.load('./models/dialogue', interpreter = nlu_interpreter, action_endpoint = action_endpoint)
# Creating the Interpreter and Agent
def load_agent():
nlu_interpreter = RasaNLUInterpreter('./models/nlu/default/productnlu')
agent = Agent.load('./models/dialogue', interpreter = nlu_interpreter)
#return agent
# Creating the server
def main_server():
agent = load_agent()
channel = BotServerInputChannel(agent, port=5005)
agent.handle_channels([channel], http_port=5005)
main_server()
After installing the specified packages in 'requirements.txt' file and running the above code, I get the following error.
tf.estimator package not installed.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\vishn\Anaconda3\lib\site-packages\tensorflow\__init__.py", line 41, in <module>
from tensorflow import compat
File "C:\Users\vishn\Anaconda3\lib\site-packages\tensorflow\compat\__init__.py", line 21, in <module>
from tensorflow.python.compat.compat import forward_compatibility_horizon
ModuleNotFoundError: No module named 'tensorflow.python.compat'
tenserflow error
Could not find a version that satisfies the requirement tensorflow (from -r requirements.txt (line 29)) (from versions: )
No matching distribution found for tensorflow (from -r requirements.txt (line 29))
TypeError: unhashable type: 'dict'
The Full Code version works fine. However, when using the Full Code [Latest release of Rasa NLU and Rasa Core] and launching train_online.py I get the error :
-imac:rasa-full-wetterbot m$ python train_online.py
Traceback (most recent call last):
File "train_online.py", line 36, in
nlu_interpreter = RasaNLUInterpreter('./models/nlu/default/weathernlu')
File "/Users/m/anaconda3/lib/python3.6/site-packages/rasa_core/interpreter.py", line 219, in init
self._load_interpreter()
File "/Users/m/anaconda3/lib/python3.6/site-packages/rasa_core/interpreter.py", line 238, in _load_interpreter
os.environ))
File "/Users/m/anaconda3/lib/python3.6/site-packages/rasa_nlu/model.py", line 230, in load
skip_valdation)
File "/Users/m/anaconda3/lib/python3.6/site-packages/rasa_nlu/model.py", line 253, in create
components.validate_requirements(model_metadata.pipeline)
File "/Users/m/anaconda3/lib/python3.6/site-packages/rasa_nlu/components.py", line 56, in validate_requirements
component_class = registry.get_component_class(component_name)
File "/Users/m/anaconda3/lib/python3.6/site-packages/rasa_nlu/registry.py", line 125, in get_component_class
if component_name not in registered_components:
TypeError: unhashable type: 'dict'
What can I do about that?
Thank you-
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.