# Unable to save stories using interactive learning

**URL:** <https://forum.rasa.com/t/unable-to-save-stories-using-interactive-learning/13333>\
**Category:** Rasa Open Source\
**Created:** [July 22, 2019, 5:25pm UTC](https://forum.rasa.com/t/unable-to-save-stories-using-interactive-learning/13333 "2019-07-22T17:25:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![chocoholic](https://avatars.discourse-cdn.com/v4/letter/c/b3f665/32.png) [@chocoholic](https://forum.rasa.com/u/chocoholic)\
**Post date:** [July 22, 2019, 5:25pm UTC](https://forum.rasa.com/t/unable-to-save-stories-using-interactive-learning/13333/1 "2019-07-22T17:25:31Z")

</div>

I’m using rasa interactive learning from the command line. After I’ve created new stories, I’m having trouble saving the stories to the stories.md file. When I hit ‘Export and Quit’, I get the option to save to data/stories.md. However, when I hit enter, I get the following error:

Unhandled exception in event loop: File “//anaconda/envs/tapoly/lib/python3.6/site-packages/prompt\_toolkit/eventloop/posix.py”, line 154, in \_run\_task t() File “//anaconda/envs/tapoly/lib/python3.6/site-packages/prompt\_toolkit/eventloop/context.py”, line 115, in new\_func return func(\*a, \*\*kw) File “//anaconda/envs/tapoly/lib/python3.6/site-packages/prompt\_toolkit/application/application.py”, line 562, in read\_from\_input self.key\_processor.process\_keys() File “//anaconda/envs/tapoly/lib/python3.6/site-packages/prompt\_toolkit/key\_binding/key\_processor.py”, line 273, in process\_keys self.\_process\_coroutine.send(key\_press) File “//anaconda/envs/tapoly/lib/python3.6/site-packages/prompt\_toolkit/key\_binding/key\_processor.py”, line 180, in \_process self.\_call\_handler(matches[-1], key\_sequence=buffer[:]) File “//anaconda/envs/tapoly/lib/python3.6/site-packages/prompt\_toolkit/key\_binding/key\_processor.py”, line 323, in \_call\_handler handler.call(event) File “//anaconda/envs/tapoly/lib/python3.6/site-packages/prompt\_toolkit/key\_binding/key\_bindings.py”, line 78, in call return self.handler(event) File “//anaconda/envs/tapoly/lib/python3.6/site-packages/prompt\_toolkit/shortcuts/prompt.py”, line 588, in \_ self.default\_buffer.validate\_and\_handle() File “//anaconda/envs/tapoly/lib/python3.6/site-packages/prompt\_toolkit/buffer.py”, line 1612, in validate\_and\_handle valid = self.validate(set\_cursor=True) File “//anaconda/envs/tapoly/lib/python3.6/site-packages/prompt\_toolkit/buffer.py”, line 1160, in validate self.validator.validate(self.document) File “//anaconda/envs/tapoly/lib/python3.6/site-packages/prompt\_toolkit/validation.py”, line 183, in validate return validator.validate(document)

Exception validate() takes 1 positional argument but 2 were given Press ENTER to continue…

I’ve tried saving it to a different (new) file but the error keeps popping up. Any help would be appreciated.

---

<div class="post-metadata">

**Author:** ![sanjaythapa](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/sanjaythapa/32/3773_2.png) [@sanjaythapa](https://forum.rasa.com/u/sanjaythapa)\
**Post date:** [July 24, 2019, 1:19am UTC](https://forum.rasa.com/t/unable-to-save-stories-using-interactive-learning/13333/2 "2019-07-24T01:19:29Z")

</div>

Continuing the discussion from [Unable to save stories using interactive learning](http://forum.rasa.com/t/unable-to-save-stories-using-interactive-learning/13333):

I am having the same issue with rasa version **1.1.6** , and the following steps are resulting the error. Steps:

1. $ rasa interactive

2. Your input → Hi

3. **Ctrl** + **C**

4. ? Do you want to stop? (Use arrow keys)

5. Used arrow key to select _Export & Quit_

I have attached the screenshot, and once I select **Export & Quit** , I simply cannot get out of the loop. So, I have to close the terminal and start again. Furthermore, it won’t save the stories developed via interactive mode.

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/c/c76159468af9b4d7eec911ff25c1a2d01f911be0.jpeg)

**I checked with Rasa 1.1.4, and Rasa 1.1.4 does not result this issue.**

---

<div class="post-metadata">

**Author:** ![molguin](https://avatars.discourse-cdn.com/v4/letter/m/3d9bf3/32.png) [@molguin](https://forum.rasa.com/u/molguin)\
**Post date:** [August 6, 2019, 1:47am UTC](https://forum.rasa.com/t/unable-to-save-stories-using-interactive-learning/13333/3 "2019-08-06T01:47:42Z")

</div>

I had the same issue and made this change in the code of the file \<python3\_instalation\>/rasa/utils/io.py line 296:

```
def validate(self,document: Document) -> None:

```

adding the parameter _self_ in the definition of validate method.

I don’t know if that change will have side effects but for now I can use interactive training mode and save the files.

---

<div class="post-metadata">

**Author:** ![chocoholic](https://avatars.discourse-cdn.com/v4/letter/c/b3f665/32.png) [@chocoholic](https://forum.rasa.com/u/chocoholic)\
**Post date:** [August 6, 2019, 6:31pm UTC](https://forum.rasa.com/t/unable-to-save-stories-using-interactive-learning/13333/4 "2019-08-06T18:31:25Z")

</div>

Thanks a tonne! That worked for me.
