Beginner here, May I know how to solve this issue?
I am following this tutorial: https://medium.com/@nattykohn/build-simple-chatbot-with-rasa-part-2-16726357b72c
python dialogue_model.py
C:\Users\YC\AppData\Local\Programs\Python\Python36\lib\site-packages\h5py__init__.py:36: 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
Using TensorFlow backend.
ERROR:rasa_core.training.dsl:Error in line 1: User message '['greet']' at invalid location. Expected story start.
Traceback (most recent call last):
File "C:\Users\YC\AppData\Local\Programs\Python\Python36\lib\site-packages\rasa_core\training\dsl.py", line 213, in process_lines
self.add_user_messages(user_messages, line_num)
File "C:\Users\YC\AppData\Local\Programs\Python\Python36\lib\site-packages\rasa_core\training\dsl.py", line 266, in add_user_messages
"Expected story start.".format(messages))
rasa_core.training.dsl.StoryParseError: User message '['greet']' at invalid location. Expected story start.
ERROR:rasa_core.training.dsl:Failed to parse 'C:\Users\YC\Desktop\PythonMU\ChatBot\data\stories.md'
Traceback (most recent call last):
File "C:\Users\YC\AppData\Local\Programs\Python\Python36\lib\site-packages\rasa_core\training\dsl.py", line 213, in process_lines
self.add_user_messages(user_messages, line_num)
File "C:\Users\YC\AppData\Local\Programs\Python\Python36\lib\site-packages\rasa_core\training\dsl.py", line 266, in add_user_messages
"Expected story start.".format(messages))
rasa_core.training.dsl.StoryParseError: User message '['greet']' at invalid location. Expected story start.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\YC\AppData\Local\Programs\Python\Python36\lib\site-packages\rasa_core\training\dsl.py", line 143, in read_from_file
return reader.process_lines(lines)
File "C:\Users\YC\AppData\Local\Programs\Python\Python36\lib\site-packages\rasa_core\training\dsl.py", line 220, in process_lines
raise Exception(msg)
Exception: Error in line 1: User message '['greet']' at invalid location. Expected story start.
Traceback (most recent call last):
File "C:\Users\YC\AppData\Local\Programs\Python\Python36\lib\site-packages\rasa_core\training\dsl.py", line 213, in process_lines
self.add_user_messages(user_messages, line_num)
File "C:\Users\YC\AppData\Local\Programs\Python\Python36\lib\site-packages\rasa_core\training\dsl.py", line 266, in add_user_messages
"Expected story start.".format(messages))
rasa_core.training.dsl.StoryParseError: User message '['greet']' at invalid location. Expected story start.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\YC\AppData\Local\Programs\Python\Python36\lib\site-packages\rasa_core\training\dsl.py", line 143, in read_from_file
return reader.process_lines(lines)
File "C:\Users\YC\AppData\Local\Programs\Python\Python36\lib\site-packages\rasa_core\training\dsl.py", line 220, in process_lines
raise Exception(msg)
Exception: Error in line 1: User message '['greet']' at invalid location. Expected story start.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "dialogue_model.py", line 20, in
validation_split=0.2)
File "C:\Users\YC\AppData\Local\Programs\Python\Python36\lib\site-packages\rasa_core\agent.py", line 152, in train
trainer.train(filename, remove_duplicates=remove_duplicates, **kwargs)
File "C:\Users\YC\AppData\Local\Programs\Python\Python36\lib\site-packages\rasa_core\policies\trainer.py", line 51, in train
remove_duplicates)
File "C:\Users\YC\AppData\Local\Programs\Python\Python36\lib\site-packages\rasa_core\policies\trainer.py", line 72, in _prepare_training_data
max_number_of_trackers=max_number_of_trackers)
File "C:\Users\YC\AppData\Local\Programs\Python\Python36\lib\site-packages\rasa_core\training__init__.py", line 45, in extract_training_data_from_file
graph = extract_story_graph_from_file(filename, domain, interpreter)
File "C:\Users\YC\AppData\Local\Programs\Python\Python36\lib\site-packages\rasa_core\training__init__.py", line 29, in extract_story_graph_from_file
story_steps = StoryFileReader.read_from_file(filename, domain, interpreter)
File "C:\Users\YC\AppData\Local\Programs\Python\Python36\lib\site-packages\rasa_core\training\dsl.py", line 147, in read_from_file
raise ValueError("Invalid story file format.")
ValueError: Invalid story file format.
the error is raise ValueError("Invalid story file format.") - so I suspect there is a problem with the format of your story file. Could you please paste it here?
The story file is a stories.md markdown file
Here it is:
It should be like this
## story 01
*greet
- utter_greet
*order_pizza
- utter_get_pizza_size
*order_pizza
- utter_get_pizza_toppings
*order_pizza
- action_order_pizza
Thank you so much, it worked! Can I get the documentation link for this stories thing?
Check this https://core.rasa.com/tutorial_basics.html
Thanks you so much!
Most helpful comment
It should be like this