[Solved] Getting error in train rasa core (IndexError: pop from an empty deque)

I’m getting the following error when trying to run the ‘rasa train’ command and I couldn’t make any sense of it. I’m a noob in rasa please help. I have uploaded my stories file. stories.md (17.3 KB)

(venv) D:\Learning_Rasa_CustomerBot>rasa train
Training Core model...
Processed Story Blocks:   0%|                                                                                                                          | 0/45 [00:00<?, ?it/s, # trackers=1]T
raceback (most recent call last):
  File "c:\users\geuser\appdata\local\programs\python\python36\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\geuser\appdata\local\programs\python\python36\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\geuser\AppData\Local\Programs\Python\Python36\Scripts\rasa.exe\__main__.py", line 9, in <module>
  File "c:\users\geuser\appdata\local\programs\python\python36\lib\site-packages\rasa\__main__.py", line 70, in main
    cmdline_arguments.func(cmdline_arguments)
  File "c:\users\geuser\appdata\local\programs\python\python36\lib\site-packages\rasa\cli\train.py", line 84, in train
    kwargs=extract_additional_arguments(args),
  File "c:\users\geuser\appdata\local\programs\python\python36\lib\site-packages\rasa\train.py", line 40, in train
    kwargs=kwargs,
  File "c:\users\geuser\appdata\local\programs\python\python36\lib\asyncio\base_events.py", line 484, in run_until_complete
    return future.result()
  File "c:\users\geuser\appdata\local\programs\python\python36\lib\site-packages\rasa\train.py", line 135, in train_async
    kwargs=kwargs,
  File "c:\users\geuser\appdata\local\programs\python\python36\lib\site-packages\rasa\train.py", line 174, in _do_training
    kwargs=kwargs,
  File "c:\users\geuser\appdata\local\programs\python\python36\lib\site-packages\rasa\train.py", line 303, in _train_core_with_validated_data
    kwargs=kwargs,
  File "c:\users\geuser\appdata\local\programs\python\python36\lib\site-packages\rasa\core\train.py", line 58, in train
    stories_file, exclusion_percentage=exclusion_percentage, **data_load_args
  File "c:\users\geuser\appdata\local\programs\python\python36\lib\site-packages\rasa\core\agent.py", line 615, in load_data
    exclusion_percentage=exclusion_percentage,
  File "c:\users\geuser\appdata\local\programs\python\python36\lib\site-packages\rasa\core\training\__init__.py", line 62, in load_data
    return g.generate()
  File "c:\users\geuser\appdata\local\programs\python\python36\lib\site-packages\rasa\core\training\generator.py", line 291, in generate
    trackers, end_trackers = self._process_step(step, incoming_trackers)
  File "c:\users\geuser\appdata\local\programs\python\python36\lib\site-packages\rasa\core\training\generator.py", line 542, in _process_step
    tracker.update(event)
  File "c:\users\geuser\appdata\local\programs\python\python36\lib\site-packages\rasa\core\training\generator.py", line 130, in update
    self._states.pop()  # removes the state used for the action
IndexError: pop from an empty deque

Solved. Actually in the stories.md I had a story with just -undo as the intent which was causing the problem.

1 Like