Hey, I’m new !
I can’t get rid of this issue. I’m using : rasa_core 0.14.0 rasa_nlu 0.15.0 tensorflow 1.13.1 rasa_core_sdk 0.14.0 And Python 3.7
With this command:
starter-pack-rasa-stack>python -m rasa_core_sdk.endpoint --actions actions
I get this issue:
2019-05-17 11:28:54 INFO main - Starting action endpoint server… 2019-05-17 11:28:54 ERROR rasa_core_sdk.executor - Failed to register package ‘actions’. Traceback (most recent call last): File “C:\Users\cyril\Anaconda3\lib\site-packages\rasa_core_sdk\executor.py”, line 150, in register_package self._import_submodules(package) File “C:\Users\cyril\Anaconda3\lib\site-packages\rasa_core_sdk\executor.py”, line 137, in import_submodules package = importlib.import_module(package) File "C:\Users\cyril\Anaconda3\lib\importlib_init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File “”, line 1006, in _gcd_import File “”, line 983, in _find_and_load File “”, line 965, in _find_and_load_unlocked ModuleNotFoundError: No module named ‘actions’ 2019-05-17 11:28:54 INFO main - Action endpoint is up and running. on (‘0.0.0.0’, 5055)
Nevertheless, I had my own action, but now, I’m using actions from RASA-demo Here is the python code of my actions.py
-- coding: utf-8 --
from future import absolute_import from future import division from future import print_function from future import unicode_literals
from rasa_core_sdk import Action from rasa_core_sdk.events import ConversationPaused
logger = logging.getLogger(name)
class ActionChitchat(Action): “”“Returns the chitchat utterance dependent on the intent”“”
def name(self): return "action_chitchat" def run(self, dispatcher, tracker, domain): intent = tracker.latest_message["intent"].get("name") # retrieve the correct chitchat utterance dependent on the intent if intent in [ "ask_isbot", "ask_languagesbot", "ask_time", "ask_whatismyname", "ask_wherefrom", "ask_whoami", "ask_weather", "ask_whoisit", "ask_whocreatedyou", "ask_whoisboss", "ask_howdoing", "ask_howold", "loveyou", "insult", ]: dispatcher.utter_template("utter_" + intent, tracker) return []
class ActionPause(Action): “”“Pause the conversation”“”
def name(self): return "action_pause" def run(self, dispatcher, tracker, domain): return [ConversationPaused()]
I declared my action in the domain
Help Thanks !