Bharathi
Bharathi

Reputation: 191

RASA Error : Invalid story file format and Failed to decode parameters as a json object

I'm using the latest version 1.10.1 of Rasa and am developing a weatherbot .

I'm unable to train my dialogue model using ' rasa train ' . When I run the command ' rasa train ' , I'm getting an error ' Invalid story file format and failed to parse stories.md ' . My stories.md seems to be in proper format. And , further along , I also get the error , ' Invalid to parse arguments in line 'slot{"location:"London"}'. Failed to decode parametersas a json object. Make sure the eventname is followed by a proper json object. Error: Expecting ':' delimiter: line 1 column 13 (char 12)'

My stories.md file :

##story_001
* greet
    -utter_greet
* inform 
    -utter_ask_location
* inform{"location:"London"}
    -slot{"location:"London"}
    -action_weather
* goodbye
    -utter_goodbye

##story_002
*greet
    -utter_greet
* inform{"location":"Paris"}
    -slot{"location":"Paris"}
    -action_weather
* goodbye
    -utter_goodbye

##story_003
* greet
    -utter_greet
* inform 
    -utter_ask_location
* inform{"location":"Vilnius"}
    -slot{"location":"Vilnius"}
    -action_weather
* goodbye
    -utter_goodbye

##story_004
* greet
    -utter_greet
* inform{"location":"Italy"}
    -slot{"location":"Italy"}
    -action_weather
* goodbye
    -utter_goodbye

##story_005
* greet
    -utter_greet
* inform
    -utter_ask_location
* inform{"location":"Lithuania"}
    -slot{"location":"Lithuania"}
    -action_weather
* goodbye
    -utter_goodbye

My domain.yml file :

slots:
    location:
        type: text

intents:
    -greet
    -goodbye
    -inform

entities:
    -location

responses:
  utter_greet:
    - text: 'Hello! How can I help?'
  utter_goodbye:
    - text: 'Bye. Talk to you later.'
    - text: 'Bubye! See ya!'
    - text: 'Au revoir'
  utter_ask_location:
    - text: 'In what location?'


actions:
    -action_weather

Is there anything wrong with my stories.md file ? Can someone please tell me what's causing this error and how I get rid of it ? Thanks in advance

Upvotes: 0

Views: 648

Answers (1)

developer101
developer101

Reputation: 118

Here is the error:

* inform{"location:"London"}

you haven't ended with a " replace this code with :

* inform{"location":"London"}

Upvotes: 3

Related Questions