Comments in MD files are processed by Rasa X

When I have a multiline comment in stories .md file such as

<!---
    OUT OF SCOPE STORIES
-->

it is being processed by Rasa X and invalid stories appear in Rasa X browser administration image

When there is an inline comment <!--- OUT OF SCOPE STORIES --> Rasa X throws error: rasa.core.exceptions.StoryParseError: Invalid story format. Failed to parse '##<!--- OUT OF SCOPE STORIES -->'

Am I doing something wrong or is this a bug?

Thanks!

I think you just have a syntax issue - you have 3 dashes instead of two, like this: <!–

Hi, @mloubser! Unfortunately, the problem persists with two dashes, too. :confused:

Does this happen on the cli also (e.g. with rasa data validate)? I don’t see it happening there. If it’s only in Rasa X, are you running it in localmode? And did you add the comments in the UI or in a code editor?

I don’t see an issue when running Rasa X locally and training either (using the same comment line)

It seems that everything is fine when I run any cli command of rasa - e.g. rasa data validate

2020-08-27 09:46:16 INFO     rasa.validator  - Validating intents...
2020-08-27 09:46:16 INFO     rasa.validator  - Validating uniqueness of intents and stories...
2020-08-27 09:46:16 INFO     rasa.validator  - Validating utterances...
2020-08-27 09:46:16 INFO     rasa.validator  - Story structure validation...
Processed Story Blocks: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 46/46 [00:00<00:00, 1903.74it/s, # trackers=1]
2020-08-27 09:46:16 INFO     rasa.core.training.story_conflict  - Considering the preceding 9 turns for conflict analysis.
2020-08-27 09:46:16 INFO     rasa.validator  - No story structure conflicts found.

Things get weird when I have a multiline comment in stories such as

<!--
OUT OF SCOPE STORIES
-->

and run rasa x as I wrote in the first post. Everything works well except the fact that in the browser GUI administration this comment also appears in the list of stories. This can get messy when having lots of comments.

image

When the comment is inlined, the rasa x can’t be even started because the exception is raised (please see the first post). On the other hand, using rasa shell or rasa train is without any problem. I run Rasa X in a local mode and write comments manually in the code editor (Sublime).

Ok, I understand the problem better now. I hadn’t noticed that before but I’ll take a look and see if I can replicate it.

1 Like