# Error :: Atleast one story block not starting with a checkpoint

**URL:** <https://forum.rasa.com/t/error-atleast-one-story-block-not-starting-with-a-checkpoint/44323>\
**Category:** Rasa Open Source\
**Created:** [June 6, 2021, 10:04am UTC](https://forum.rasa.com/t/error-atleast-one-story-block-not-starting-with-a-checkpoint/44323 "2021-06-06T10:04:17Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![amit.pathak](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/amit.pathak/32/15252_2.png) [@amit.pathak](https://forum.rasa.com/u/amit.pathak)\
**Post date:** [June 6, 2021, 10:04am UTC](https://forum.rasa.com/t/error-atleast-one-story-block-not-starting-with-a-checkpoint/44323/1 "2021-06-06T10:04:17Z")

</div>

While running `rasa data validate` I see the following error:

```auto
$ rasa data validate
2021-06-07 19:23:46 INFO rasa.validator - Validating intents...
2021-06-07 19:23:46 INFO rasa.validator - Validating uniqueness of intents and stories...
2021-06-07 19:23:46 INFO rasa.validator - Validating utterances...
2021-06-07 19:23:46 INFO rasa.validator - Story structure validation...
Processed Story Blocks: 0it [00:00, ?it/s]
c:\python365\lib\site-packages\rasa\utils\common.py:351: UserWarning: There is no starting story block in the training data. All your story blocks start with some checkpoint. There should be at least one story block that starts without any checkpoint.
  More info at https://rasa.com/docs/rasa/core/stories/#stories

Traceback (most recent call last):
  File "c:\python365\lib\runpy.py", line 193, in _run_module_as_main
    " __main__", mod_spec)
  File "c:\python365\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Python365\Scripts\rasa.exe\ __main__.py", line 7, in <module>
  File "c:\python365\lib\site-packages\rasa\ __main__.py", line 91, in main
    cmdline_arguments.func(cmdline_arguments)
  File "c:\python365\lib\site-packages\rasa\cli\data.py", line 156, in validate_files
    and _validate_story_structure(validator, args)
  File "c:\python365\lib\site-packages\rasa\cli\data.py", line 183, in _validate_story_structure
    not args.fail_on_warnings, max_history=args.max_history
  File "c:\python365\lib\site-packages\rasa\validator.py", line 228, in verify_story_structure
    trackers, self.domain, max_history
  File "c:\python365\lib\site-packages\rasa\core\training\story_conflict.py", line 163, in find_story_conflicts
    max_history = _get_length_of_longest_story(trackers, domain)
  File "c:\python365\lib\site-packages\rasa\core\training\story_conflict.py", line 144, in _get_length_of_longest_story
    return max([len(tracker.past_states(domain)) for tracker in trackers])
ValueError: max() arg is an empty sequence

```

However, I do have my first story block which does not start with a checkpoint. Still not sure what does this error actually mean.

Here is my complete `stories.yml` file

```auto
version: "2.0"

stories:

- story: display the greeting menu
  steps:
  - intent: init_request
  - action: utter_greet
  - action: utter_menu
  - checkpoint: ask_pizza_type

- story: standard order flow
  steps:
  - checkpoint: ask_pizza_type
  - intent: want_pizza_type
  - action: utter_pizza_size
  - intent: want_pizza_size
  - action: utter_pizza_quantity
  - intent: want_pizza_quantity
  - action: utter_extra_topping
  - checkpoint: confirm_topping

- story: user places complete order
  steps:
  - checkpoint: ask_pizza_type
  - intent: complete_order
  - action: utter_extra_topping
  - checkpoint: confirm_topping
  

- story: users wants topping
  steps:
  - checkpoint: confirm_topping
  - intent: response_positive
  - action: utter_order_confirmation
  - checkpoint: confirm_order

- story: user does not want topping
  steps:
  - checkpoint: confirm_topping
  - intent: response_negative
  - action: utter_order_confirmation
  - checkpoint: confirm_order

- story: user confirms order
  steps:
  - checkpoint: confirm_order
  - intent: response_positive
  - action: utter_order_placed

- story: user denies order
  steps:
  - checkpoint: confirm_order
  - intent: response_negative
  - action: utter_sad_goodbye

```

Any suggestions over improvement will be highly appreciated since this is my first bot using rasa framework : )

---

<div class="post-metadata">

**Author:** ![anca](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/anca/32/14540_2.png) [@anca](https://forum.rasa.com/u/anca)\
**Post date:** [June 7, 2021, 8:42am UTC](https://forum.rasa.com/t/error-atleast-one-story-block-not-starting-with-a-checkpoint/44323/2 "2021-06-07T08:42:58Z")

</div>

Hi @amit.pathak In order to ascertain if this is a bug, could you please run `rasa data validate --debug` and post the full debug log here?

Additionally, I see an inconsistency in your last two stories, your bot is responding to the same intent `response_positive` with different actions, that might cause something to break:

```auto
- story: user confirms order
  steps:
  - checkpoint: confirm_order
  - intent: response_positive
  - action: utter_order_placed

- story: user denies order
  steps:
  - checkpoint: confirm_order
  - intent: response_positive
  - action: utter_sad_goodbye

```

---

<div class="post-metadata">

**Author:** ![amit.pathak](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/amit.pathak/32/15252_2.png) [@amit.pathak](https://forum.rasa.com/u/amit.pathak)\
**Post date:** [June 7, 2021, 2:12pm UTC](https://forum.rasa.com/t/error-atleast-one-story-block-not-starting-with-a-checkpoint/44323/3 "2021-06-07T14:12:02Z")

</div>

Hey @anca, thankyou for pointing out the issue in the story … It was a typo and I have fixed it.

For the debug log, here is what I got -

```auto
$ rasa data validate --debug
2021-06-07 19:31:27 DEBUG pykwalify.compat - Using yaml library: c:\python365\lib\site-packages\ruamel\yaml\ __init__.py
2021-06-07 19:31:28 INFO rasa.validator - Validating intents...
2021-06-07 19:31:28 DEBUG rasa.validator - The intent 'bot_challenge' is listed in the domain file, but is not found in the NLU training data.    
2021-06-07 19:31:28 DEBUG rasa.validator - The intent 'complete_order' is listed in the domain file, but is not found in the NLU training data.   
2021-06-07 19:31:28 DEBUG rasa.validator - The intent 'goodbye' is listed in the domain file, but is not found in the NLU training data.
2021-06-07 19:31:28 DEBUG rasa.validator - The intent 'init_request' is listed in the domain file, but is not found in the NLU training data.     
2021-06-07 19:31:28 DEBUG rasa.validator - The intent 'response_negative' is listed in the domain file, but is not found in the NLU training data.
2021-06-07 19:31:28 DEBUG rasa.validator - The intent 'response_positive' is listed in the domain file, but is not found in the NLU training data.
2021-06-07 19:31:28 DEBUG rasa.validator - The intent 'utter_sad_goodbye' is listed in the domain file, but is not found in the NLU training data.
2021-06-07 19:31:28 DEBUG rasa.validator - The intent 'want_extra_topping' is listed in the domain file, but is not found in the NLU training data.
2021-06-07 19:31:28 DEBUG rasa.validator - The intent 'want_pizza_quantity' is listed in the domain file, but is not found in the NLU training data.
2021-06-07 19:31:28 DEBUG rasa.validator - The intent 'want_pizza_size' is listed in the domain file, but is not found in the NLU training data.  
2021-06-07 19:31:28 DEBUG rasa.validator - The intent 'want_pizza_type' is listed in the domain file, but is not found in the NLU training data.  
2021-06-07 19:31:28 DEBUG rasa.validator - The intent 'bot_challenge' is not used in any story.
2021-06-07 19:31:28 DEBUG rasa.validator - The intent 'complete_order' is not used in any story.
2021-06-07 19:31:28 DEBUG rasa.validator - The intent 'goodbye' is not used in any story.
2021-06-07 19:31:28 DEBUG rasa.validator - The intent 'init_request' is not used in any story.
2021-06-07 19:31:28 DEBUG rasa.validator - The intent 'response_negative' is not used in any story.
2021-06-07 19:31:28 DEBUG rasa.validator - The intent 'response_positive' is not used in any story.
2021-06-07 19:31:28 DEBUG rasa.validator - The intent 'utter_sad_goodbye' is not used in any story.
2021-06-07 19:31:28 DEBUG rasa.validator - The intent 'want_extra_topping' is not used in any story.
2021-06-07 19:31:28 DEBUG rasa.validator - The intent 'want_pizza_quantity' is not used in any story.
2021-06-07 19:31:28 DEBUG rasa.validator - The intent 'want_pizza_size' is not used in any story.
2021-06-07 19:31:28 DEBUG rasa.validator - The intent 'want_pizza_type' is not used in any story.
2021-06-07 19:31:28 INFO rasa.validator - Validating uniqueness of intents and stories...
2021-06-07 19:31:28 INFO rasa.validator - Validating utterances...
2021-06-07 19:31:28 DEBUG rasa.validator - The utterance 'utter_pizza_quantity' is not used in any story.
2021-06-07 19:31:28 DEBUG rasa.validator - The utterance 'utter_order_placed' is not used in any story.
2021-06-07 19:31:28 DEBUG rasa.validator - The utterance 'utter_pizza_size' is not used in any story.
2021-06-07 19:31:28 DEBUG rasa.validator - The utterance 'utter_greet' is not used in any story.
2021-06-07 19:31:28 DEBUG rasa.validator - The utterance 'utter_menu' is not used in any story.
2021-06-07 19:31:28 DEBUG rasa.validator - The utterance 'utter_iamabot' is not used in any story.
2021-06-07 19:31:28 DEBUG rasa.validator - The utterance 'utter_sad_goodbye' is not used in any story.
2021-06-07 19:31:28 DEBUG rasa.validator - The utterance 'utter_order_confirmation' is not used in any story.
2021-06-07 19:31:28 DEBUG rasa.validator - The utterance 'utter_extra_topping' is not used in any story.
2021-06-07 19:31:28 INFO rasa.validator - Story structure validation...
2021-06-07 19:31:28 DEBUG rasa.core.training.generator - Number of augmentation rounds is 0
2021-06-07 19:31:28 DEBUG rasa.core.training.generator - Starting data generation round 0 ... (with 1 trackers)
Processed Story Blocks: 0it [00:00, ?it/s]
2021-06-07 19:31:28 DEBUG rasa.core.training.generator - Finished phase (0 training samples found).
2021-06-07 19:31:28 DEBUG rasa.core.training.generator - Data generation rounds finished.
2021-06-07 19:31:28 DEBUG rasa.core.training.generator - Found 1 unused checkpoints
c:\python365\lib\site-packages\rasa\utils\common.py:351: UserWarning: There is no starting story block in the training data. All your story blocks start with some checkpoint. There should be at least one story block that starts without any checkpoint.
  More info at https://rasa.com/docs/rasa/core/stories/#stories
2021-06-07 19:31:28 DEBUG rasa.core.training.generator - Found 0 training trackers.
Traceback (most recent call last):
  File "c:\python365\lib\runpy.py", line 193, in _run_module_as_main
    " __main__", mod_spec)
  File "c:\python365\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Python365\Scripts\rasa.exe\ __main__.py", line 7, in <module>
  File "c:\python365\lib\site-packages\rasa\ __main__.py", line 91, in main
    cmdline_arguments.func(cmdline_arguments)
  File "c:\python365\lib\site-packages\rasa\cli\data.py", line 156, in validate_files
    and _validate_story_structure(validator, args)
  File "c:\python365\lib\site-packages\rasa\cli\data.py", line 183, in _validate_story_structure
    not args.fail_on_warnings, max_history=args.max_history
  File "c:\python365\lib\site-packages\rasa\validator.py", line 228, in verify_story_structure
    trackers, self.domain, max_history
  File "c:\python365\lib\site-packages\rasa\core\training\story_conflict.py", line 163, in find_story_conflicts
    max_history = _get_length_of_longest_story(trackers, domain)
  File "c:\python365\lib\site-packages\rasa\core\training\story_conflict.py", line 144, in _get_length_of_longest_story
    return max([len(tracker.past_states(domain)) for tracker in trackers])
ValueError: max() arg is an empty sequence

```

I have already mentioned these intents in `nlu.yml`. Here is my `nlu.yml` file.

```auto
version: "2.0"

nlu:
- intent: init_request
  examples: |
    - hey
    - hello
    - hi
    - hello there
    - good morning
    - good evening
    - moin
    - hey there
    - let's go
    - hey dude
    - goodmorning
    - goodevening
    - good afternoon
    - yo
    - I want pizza
    - I want to order a pizza
    - I wnt to ordr a pijja
    - I wntt piza
    - pizza
    - pizza please
    - Pizza please
    - Pizza will do
    - pizza will do
    - Pizza
    - pijja
    - pija
    - pijaa
    - order
    - menu
    - do you have pizza ?

- intent: goodbye
  examples: |
    - cu
    - good by
    - cee you later
    - good night
    - bye
    - goodbye
    - have a nice day
    - see you around
    - bye bye
    - see you later

- intent: bot_challenge
  examples: |
    - are you a bot?
    - are you a human?
    - am I talking to a bot?
    - am I talking to a human?

- intent: complete_order
  examples: |
    - I want [two](pizza_amount) [small](pizza_size) [Funghi](pizza_type) pizza 
    - I want [one](pizza_amount) [Funghi](pizza_type) [small](pizza_size) pizza 
    - I want [Funghi](pizza_type) [small](pizza_size) pizza [three](pizza_amount)
    - I want [four](pizza_amount) [small](pizza_size) pizza [Funghi](pizza_type)  
    - I want [2](pizza_amount) [medium](pizza_size) pizza [hawaii](pizza_type) please
    - [two](pizza_amount) [medium](pizza_size) [Margherita](pizza_type) pizza 
    - [2](pizza_amount) [large](pizza_size) [Hawaii](pizza_type) pizza 

- intent: want_pizza_type
  examples: |
    - [Funghi](pizza_type) pizza 
    - I want [Funghi](pizza_type)
    - do you have [Funghi](pizza_type)
    - I need [Funghi](pizza_type)
    - get me a [Funghi](pizza_type)
    - order for me a [Funghi](pizza_type)

- intent: want_pizza_size
  examples: |
    - [small](pizza_size) pizza 
    - I want [small](pizza_size)
    - do you have [small](pizza_size)
    - I need [small](pizza_size)
    - get me a [small](pizza_size)
    - order for me a [small](pizza_size)

- intent: want_extra_topping
  examples: |
    - [paneer](pizza_topping)
    - I would like to add [paneer](pizza_topping)
    - [paneer](pizza_topping) pizza 
    - I want [paneer](pizza_topping)
    - do you have [paneer](pizza_topping)
    - I need [paneer](pizza_topping)
    - get me a [paneer](pizza_topping)
    - order for me a [paneer](pizza_topping)

- intent: want_pizza_quantity
  examples: |
    - [3](pizza_quantity)
    - I want [3](pizza_quantity) pizza

- intent: response_positive
  examples: |
    - all good
    - yeah all is sgood 
    - yep
    - yeah
    - perfect
    - yes, that is right
    - yes
    - y
    - indeed
    - of course
    - that sounds good
    - that's right
    - correct
    - Yes
    - Yeah

- intent: response_negative
  examples: |
    - actually no
    - nope
    - no
    - n
    - never
    - I don't think so
    - don't like that
    - no way
    - not really
    - Nope
    - No, I want to make a change
    - Noo

- lookup: pizza_type
  examples: |
    - Farmhouse
    - farmhouse
    - Exotic Chilly
    - Chicken Sausage
    - Margherita

- lookup: pizza_size
  examples: |
    - Regular
    - Medium
    - Large
    - Extra Large

- lookup: pizza_topping
  examples: |
    - Chicken
    - paneer
    - Tomatoes
    - Mushroom
    - corn
    - olives
    - onion
    - capsicum

- lookup: pizza_quantity
  examples: |
    - 1
    - 2
    - 3
    - 4
    - 5
    - 6
    - 7
    - 8
    - 9
    - one
    - two
    - three
    - four

```

Also, domain.yml file is defined as -

```auto
version: "2.0"

intents:
  - init_request
  - goodbye
  - utter_sad_goodbye
  - response_positive
  - response_negative
  - complete_order
  - bot_challenge
  - want_pizza_type
  - want_pizza_size
  - want_extra_topping
  - want_pizza_quantity

responses:
  utter_greet:
  - text: "Hey! Hope you are doing good!"

  utter_menu:
  - text: "What would you like to have today? We have a range of pizzas to select from.\nFarmhouse\nExotic Chilly\nChicken Sausage, etc"

  utter_pizza_size:
  - text: "What pizza size do you want? \nRegular | Medium | Large | Extra Large"
    image: "https://i.imgur.com/nGF1K8f.jpg"

  utter_extra_topping:
  - text: "Do you want extra toppings to multiply your happiness?"

  utter_pizza_quantity:
  - text: "How many pizza do you need? Make sure you don't fight later! : P"

  utter_order_confirmation:
  - text: "Do you want to confirm your order?"

  utter_sad_goodbye:
  - text: ":( We were hoping to make you happy today. See you next time!"

  utter_iamabot:
  - text: "I am a bot, powered by Rasa."

  utter_order_placed:
  - text: "Thankyou for ordering with us. You pizza will arrive in 30 minutes."

session_config:
  session_expiration_time: 60
  carry_over_slots_to_new_session: true

```

I validated both this `yaml` files for any errors in syntax using [this yamlint link](http://www.yamllint.com/) and found them to be perfect.

For better view, I have uploaded the entire code on [this GitHub link](https://github.com/VikingPathak/Rasa_Pizza_Bot)

---

<div class="post-metadata">

**Author:** ![anca](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/anca/32/14540_2.png) [@anca](https://forum.rasa.com/u/anca)\
**Post date:** [June 7, 2021, 3:55pm UTC](https://forum.rasa.com/t/error-atleast-one-story-block-not-starting-with-a-checkpoint/44323/4 "2021-06-07T15:55:06Z")

</div>

Hi @amit.pathak thanks for providing the log, we should start solving each warning one by one. The main problems are the fact that your files in `data` don’t seem to be identified by rasa. May I ask at what directory level you are running `rasa data validate`? Are you at the root directory, the same level where your `domain` and `config` files, as well as the `data` subdirectory? Finally, might be helpful also to know which rasa version you’re running - should have asked that first!

I had a quick look at your repo - many thanks for providing that too, I noticed a response being listed among intents in `domain.yml`: `utter_sad_goodbye` should be removed.

---

<div class="post-metadata">

**Author:** ![amit.pathak](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/amit.pathak/32/15252_2.png) [@amit.pathak](https://forum.rasa.com/u/amit.pathak)\
**Post date:** [June 8, 2021, 5:05am UTC](https://forum.rasa.com/t/error-atleast-one-story-block-not-starting-with-a-checkpoint/44323/5 "2021-06-08T05:05:37Z")

</div>

Hello @anca I am running the `rasa data validate` at root directory level where my `domain` and `config` files are present. The rasa version I am currently using is `1.9.5`.

Although, did not get why the intent `utter_sad_goodbye` should be removed ? Since, it is being used in the last story in `stories.yml` i.e. `story: user denies order`

---

<div class="post-metadata">

**Author:** ![amit.pathak](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/amit.pathak/32/15252_2.png) [@amit.pathak](https://forum.rasa.com/u/amit.pathak)\
**Post date:** [June 8, 2021, 5:10am UTC](https://forum.rasa.com/t/error-atleast-one-story-block-not-starting-with-a-checkpoint/44323/6 "2021-06-08T05:10:43Z")

</div>

@ancaI just checked the `rasa data validate` after updating to latest rasa version `2.7` … now the code works fine with training happening as well.

Even I should have checked which `rasa version` earlier which it was picking. Do you think, the above error is because of the difference in versions ? Because I did `pip install rasa` and then `rasa init` to generate the initial code. Not sure what must have gone wrong, since, I believe `rasa 1.x` version uses markdown format for data files.

---

<div class="post-metadata">

**Author:** ![anca](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/anca/32/14540_2.png) [@anca](https://forum.rasa.com/u/anca)\
**Post date:** [June 8, 2021, 7:53am UTC](https://forum.rasa.com/t/error-atleast-one-story-block-not-starting-with-a-checkpoint/44323/7 "2021-06-08T07:53:49Z")

</div>

@amit.pathak Glad to hear that you have sorted the issue 🚀I looked in the [version migration guide](https://rasa.com/docs/rasa/migration-guide/#rasa-110-to-rasa-20), although nothing explicitly is mentioned about modifications to `rasa data validate` command, I believe you ran into this problem because yaml wasn’t supported yet in rasa `1.x`.

> Although, did not get why the intent `utter_sad_goodbye` should be removed ?

This is not an intent, this is a bot utterance the way you use it in the story and since you also specified it in `responses` in the domain file. [Intents](https://rasa.com/docs/rasa/glossary#intent) are only defined for user utterances.

Quite strange that pip didn’t install the latest rasa version - was this a recent installation?

---

<div class="post-metadata">

**Author:** ![amit.pathak](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/amit.pathak/32/15252_2.png) [@amit.pathak](https://forum.rasa.com/u/amit.pathak)\
**Post date:** [June 8, 2021, 1:13pm UTC](https://forum.rasa.com/t/error-atleast-one-story-block-not-starting-with-a-checkpoint/44323/8 "2021-06-08T13:13:08Z")

</div>

Alright, I will make the correction to that intent.

Yes, I recently installed rasa, particularly on the same day when I raised the issue. But anyways, I believe I must have done something wrong on my current machine since I installed rasa using pip on my personal system a few hours ago and things worked out smoothly.

I think we can close this now, thankyou for all the responses @anca : ) Really helpful !
