# Contradicting rules or stories found with categorical slots

**URL:** <https://forum.rasa.com/t/contradicting-rules-or-stories-found-with-categorical-slots/43391>\
**Category:** Rasa Open Source\
**Created:** [May 10, 2021, 2:22am UTC](https://forum.rasa.com/t/contradicting-rules-or-stories-found-with-categorical-slots/43391 "2021-05-10T02:22:56Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![DanielOlarte](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/danielolarte/32/6890_2.png) [@DanielOlarte](https://forum.rasa.com/u/DanielOlarte)\
**Post date:** [May 10, 2021, 2:22am UTC](https://forum.rasa.com/t/contradicting-rules-or-stories-found-with-categorical-slots/43391/1 "2021-05-10T02:22:56Z")

</div>

Hello everyone

I’m currently trying the latest version (2.6.0), and I currently have this rule that will be triggered when the schedule form is submitted.

```
  - rule: Submit schedule demo form
    condition:
      - active_loop: schedule_demo_form
    steps:
      - action: schedule_demo_form
      - active_loop: null
      - slot_was_set:
          - interested_demo: "yes"
      - action: utter_want_schedule_demo

  - rule: Submit schedule demo form - 2
    condition:
      - active_loop: schedule_demo_form
    steps:
      - action: schedule_demo_form
      - active_loop: null
      - slot_was_set:
          - interested_demo: "no"
      - action: utter_dont_want_schedule_demo

```

But, when I train the bot, I receive the following message:

> InvalidRule:
> 
> Contradicting rules or stories found 🚨
> 
> - the prediction of the action ‘utter\_dont\_want\_schedule\_demo’ in rule ‘Submit schedule demo form - 2’ is contradicting with rule(s) ‘Submit schedule demo form’ which predicted action ‘utter\_want\_schedule\_demo’.
> 
> Please update your stories and rules so that they don’t contradict each other.
> 
> You can find more information about the usage of rules at [Rules](https://rasa.com/docs/rasa/rules).

The interested demo slot is categorical like this:

```
  interested_demo:
    type: categorical
    influence_conversation: true
    values:
      - yes
      - no

```

I’m not sure what I’m doing wrong, I tested in 2.4.0 and the error doesn’t show up. I thought that I could use categorical slots to guide the flow as I want.

Let me know what I can do

---

<div class="post-metadata">

**Author:** ![fkoerner](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/fkoerner/32/11784_2.png) [@fkoerner](https://forum.rasa.com/u/fkoerner)\
**Post date:** [May 14, 2021, 7:04am UTC](https://forum.rasa.com/t/contradicting-rules-or-stories-found-with-categorical-slots/43391/2 "2021-05-14T07:04:05Z")

</div>

Hi @DanielOlarte, your usage of categorical slots is just fine, the behaviour you’re seeing is due to a bug introduced in `2.5.0`. We wrote a fix for this, which should be in `2.6.1`. Please let me know if you continue to see this behaviour.

---

<div class="post-metadata">

**Author:** ![DanielOlarte](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/danielolarte/32/6890_2.png) [@DanielOlarte](https://forum.rasa.com/u/DanielOlarte)\
**Post date:** [May 16, 2021, 4:19pm UTC](https://forum.rasa.com/t/contradicting-rules-or-stories-found-with-categorical-slots/43391/3 "2021-05-16T16:19:51Z")

</div>

Hi @fkoerner. Yes, we keep seeing that issue after updating to 2.6.1

> InvalidRule:
> 
> Contradicting rules or stories found 🚨
> 
> - the prediction of the action ‘utter\_dont\_want\_schedule\_demo’ in rule ‘Submit schedule demo form - 2’ is contradicting with rule(s) ‘Submit schedule demo form’ which predicted action ‘utter\_want\_schedule\_demo’.
> 
> Please update your stories and rules so that they don’t contradict each other.
> 
> You can find more information about the usage of rules at [Rules](https://rasa.com/docs/rasa/rules).

And:

```
Rasa Version : 2.6.1
Minimum Compatible Version: 2.6.0
Rasa SDK Version : 2.6.0
Rasa X Version : None
Python Version : 3.7.3
Operating System : Darwin-20.3.0-x86_64-i386-64bit
Python Path : /Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7

```

Let me know if I missed something

Thanks

---

<div class="post-metadata">

**Author:** ![fkoerner](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/fkoerner/32/11784_2.png) [@fkoerner](https://forum.rasa.com/u/fkoerner)\
**Post date:** [May 17, 2021, 7:26am UTC](https://forum.rasa.com/t/contradicting-rules-or-stories-found-with-categorical-slots/43391/4 "2021-05-17T07:26:03Z")

</div>

Hi @DanielOlarte, sorry, I jumped the gun. Turns out this fix didn’t make it into `2.6.1`, and it should be in the next minor release. If this is blocking your progress, you can also try and compile from source. The relevant fix is [here](https://github.com/RasaHQ/rasa/pull/8689)

---

<div class="post-metadata">

**Author:** ![DanielOlarte](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/danielolarte/32/6890_2.png) [@DanielOlarte](https://forum.rasa.com/u/DanielOlarte)\
**Post date:** [May 17, 2021, 5:54pm UTC](https://forum.rasa.com/t/contradicting-rules-or-stories-found-with-categorical-slots/43391/5 "2021-05-17T17:54:42Z")

</div>

Hi @fkoerner

Great, any timeline for that release? just wondering. For the moment, we just revert it back to 2.4.\* until that fix is done.

Thanks,

---

<div class="post-metadata">

**Author:** ![kosniaz](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/kosniaz/32/9731_2.png) [@kosniaz](https://forum.rasa.com/u/kosniaz)\
**Post date:** [May 18, 2021, 9:40am UTC](https://forum.rasa.com/t/contradicting-rules-or-stories-found-with-categorical-slots/43391/6 "2021-05-18T09:40:29Z")

</div>

Had the same issue, thanks for answering! Waiting for [Repeat PR on 2.6.x branch by JEM-Mosig · Pull Request #8689 · RasaHQ/rasa · GitHub](https://github.com/RasaHQ/rasa/pull/8689) to be included in the next release.

---

<div class="post-metadata">

**Author:** ![fkoerner](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/fkoerner/32/11784_2.png) [@fkoerner](https://forum.rasa.com/u/fkoerner)\
**Post date:** [May 18, 2021, 10:04am UTC](https://forum.rasa.com/t/contradicting-rules-or-stories-found-with-categorical-slots/43391/7 "2021-05-18T10:04:58Z")

</div>

It’s out! See release notes [here](https://github.com/RasaHQ/rasa/releases/tag/2.6.2)

Let me know if you have any other issues related to this but hopefully this time it’s all ironed out 🙂

---

<div class="post-metadata">

**Author:** ![DanielOlarte](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/danielolarte/32/6890_2.png) [@DanielOlarte](https://forum.rasa.com/u/DanielOlarte)\
**Post date:** [May 18, 2021, 2:38pm UTC](https://forum.rasa.com/t/contradicting-rules-or-stories-found-with-categorical-slots/43391/8 "2021-05-18T14:38:37Z")

</div>

Great! It’s working without issues. Thank you!

---

<div class="post-metadata">

**Author:** ![fkoerner](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/fkoerner/32/11784_2.png) [@fkoerner](https://forum.rasa.com/u/fkoerner)\
**Post date:** [May 19, 2021, 6:30am UTC](https://forum.rasa.com/t/contradicting-rules-or-stories-found-with-categorical-slots/43391/9 "2021-05-19T06:30:58Z")

</div>

Glad to hear it 🙂 Happy bot-building!

---

<div class="post-metadata">

**Author:** ![annthehuman](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/annthehuman/32/15303_2.png) [@annthehuman](https://forum.rasa.com/u/annthehuman)\
**Post date:** [May 31, 2021, 3:43pm UTC](https://forum.rasa.com/t/contradicting-rules-or-stories-found-with-categorical-slots/43391/10 "2021-05-31T15:43:41Z")

</div>

Hi! I am facing almost the same issue with list type slots .

My Rasa is

```
Rasa Version : 2.6.2
Minimum Compatible Version: 2.6.0
Rasa SDK Version : 2.6.0
Rasa X Version : None
Python Version : 3.6.8
Operating System : Windows-10-10.0.17763-SP0

```

My rules are

```
version: "2.0"
rules:
  - rule: predictive_dynamic_set
    steps:
      - intent: buttons
      - action: action_get_buttons
      - slot_was_set:
        - buttons: [1, 2, 3]
      - action: utter_predictive_buttons

  - rule: predictive_static_set
    steps:
      - intent: buttons
      - action: action_get_buttons
      - slot_was_set:
        - buttons: null
      - action: utter_static_buttons

```

Slot in domain:

```
  predictive-buttons:
    type: list
    influence_conversation: true

```

And error is:

```
InvalidRule: 
Contradicting rules or stories found

- the prediction of the action 'utter_static_buttons' in rule 'predictive_static_set' is contradicting with rule(s) 'predictive_dyn
amic_set'.
- the prediction of the action 'utter_predictive_buttons' in rule 'predictive_dynamic_set' is contradicting with rule(s) 'predictiv
e_static_set'.
Please update your stories and rules so that they don't contradict each other.
```

---

<div class="post-metadata">

**Author:** ![fkoerner](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/fkoerner/32/11784_2.png) [@fkoerner](https://forum.rasa.com/u/fkoerner)\
**Post date:** [May 31, 2021, 4:10pm UTC](https://forum.rasa.com/t/contradicting-rules-or-stories-found-with-categorical-slots/43391/11 "2021-05-31T16:10:09Z")

</div>

Hi @annthehuman, looks to me like this is another related bug ☹ Would you mind creating an issue [here](https://github.com/RasaHQ/rasa/issues/new/choose)?

---

<div class="post-metadata">

**Author:** ![fkoerner](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/fkoerner/32/11784_2.png) [@fkoerner](https://forum.rasa.com/u/fkoerner)\
**Post date:** [June 2, 2021, 8:43am UTC](https://forum.rasa.com/t/contradicting-rules-or-stories-found-with-categorical-slots/43391/12 "2021-06-02T08:43:00Z")

</div>

I see you created an issue, thank you very much! 🙂
