# InvalidConfigException: Can't load class for name 'MappingPolicy'. Please make sure to provide a valid name or module path and to register it using the '@DefaultV1Recipe.register' decorator

**URL:** <https://forum.rasa.com/t/invalidconfigexception-cant-load-class-for-name-mappingpolicy-please-make-sure-to-provide-a-valid-name-or-module-path-and-to-register-it-using-the-defaultv1recipe-register-decorator/51133>\
**Category:** Rasa Open Source\
**Created:** [February 4, 2022, 2:45pm UTC](https://forum.rasa.com/t/invalidconfigexception-cant-load-class-for-name-mappingpolicy-please-make-sure-to-provide-a-valid-name-or-module-path-and-to-register-it-using-the-defaultv1recipe-register-decorator/51133 "2022-02-04T14:45:43Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![khushboo\_kumari](https://avatars.discourse-cdn.com/v4/letter/k/839c29/32.png) [@khushboo\_kumari](https://forum.rasa.com/u/khushboo_kumari)\
**Post date:** [February 4, 2022, 2:45pm UTC](https://forum.rasa.com/t/invalidconfigexception-cant-load-class-for-name-mappingpolicy-please-make-sure-to-provide-a-valid-name-or-module-path-and-to-register-it-using-the-defaultv1recipe-register-decorator/51133/1 "2022-02-04T14:45:43Z")

</div>

![rasa_chat](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/3X/b/0/b0ab089a388ea04e6fef86ee6018b9f6ff663ed9.png)

```auto
(install_rasa) E:\New folder\Anaconda3\chat>rasa train
InvalidConfigException: Can't load class for name 'MappingPolicy'. Please make sure to provide a valid name or module path and to register it using the '@DefaultV1Recipe.register' decorator.

```

---

<div class="post-metadata">

**Author:** ![nik202](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nik202/32/16098_2.png) [@nik202](https://forum.rasa.com/u/nik202)\
**Post date:** [February 4, 2022, 3:39pm UTC](https://forum.rasa.com/t/invalidconfigexception-cant-load-class-for-name-mappingpolicy-please-make-sure-to-provide-a-valid-name-or-module-path-and-to-register-it-using-the-defaultv1recipe-register-decorator/51133/2 "2022-02-04T15:39:17Z")

</div>

@khushboo_kumari can you please share the` rasa --version` and `config.yml` file

OR

You migrated from 1.x to 2.x to 3.x?

---

<div class="post-metadata">

**Author:** ![khushboo\_kumari](https://avatars.discourse-cdn.com/v4/letter/k/839c29/32.png) [@khushboo\_kumari](https://forum.rasa.com/u/khushboo_kumari)\
**Post date:** [February 4, 2022, 3:55pm UTC](https://forum.rasa.com/t/invalidconfigexception-cant-load-class-for-name-mappingpolicy-please-make-sure-to-provide-a-valid-name-or-module-path-and-to-register-it-using-the-defaultv1recipe-register-decorator/51133/3 "2022-02-04T15:55:53Z")

</div>

yes i migrated.

---

<div class="post-metadata">

**Author:** ![nik202](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nik202/32/16098_2.png) [@nik202](https://forum.rasa.com/u/nik202)\
**Post date:** [February 4, 2022, 3:56pm UTC](https://forum.rasa.com/t/invalidconfigexception-cant-load-class-for-name-mappingpolicy-please-make-sure-to-provide-a-valid-name-or-module-path-and-to-register-it-using-the-defaultv1recipe-register-decorator/51133/4 "2022-02-04T15:56:21Z")

</div>

@khushboo_kumari share config.yml please?

---

<div class="post-metadata">

**Author:** ![khushboo\_kumari](https://avatars.discourse-cdn.com/v4/letter/k/839c29/32.png) [@khushboo\_kumari](https://forum.rasa.com/u/khushboo_kumari)\
**Post date:** [February 4, 2022, 5:30pm UTC](https://forum.rasa.com/t/invalidconfigexception-cant-load-class-for-name-mappingpolicy-please-make-sure-to-provide-a-valid-name-or-module-path-and-to-register-it-using-the-defaultv1recipe-register-decorator/51133/5 "2022-02-04T17:30:04Z")

</div>

[config.yml](https://forum.rasa.com/uploads/short-url/rBsJaxxSt1oPOqGn863LEtuXb4W.yml) (2.4 KB)

---

<div class="post-metadata">

**Author:** ![khushboo\_kumari](https://avatars.discourse-cdn.com/v4/letter/k/839c29/32.png) [@khushboo\_kumari](https://forum.rasa.com/u/khushboo_kumari)\
**Post date:** [February 4, 2022, 5:33pm UTC](https://forum.rasa.com/t/invalidconfigexception-cant-load-class-for-name-mappingpolicy-please-make-sure-to-provide-a-valid-name-or-module-path-and-to-register-it-using-the-defaultv1recipe-register-decorator/51133/6 "2022-02-04T17:33:31Z")

</div>

rasa version: 3.0.6

---

<div class="post-metadata">

**Author:** ![khushboo\_kumari](https://avatars.discourse-cdn.com/v4/letter/k/839c29/32.png) [@khushboo\_kumari](https://forum.rasa.com/u/khushboo_kumari)\
**Post date:** [February 4, 2022, 5:33pm UTC](https://forum.rasa.com/t/invalidconfigexception-cant-load-class-for-name-mappingpolicy-please-make-sure-to-provide-a-valid-name-or-module-path-and-to-register-it-using-the-defaultv1recipe-register-decorator/51133/7 "2022-02-04T17:33:58Z")

</div>

[config.yml](https://forum.rasa.com/uploads/short-url/rBsJaxxSt1oPOqGn863LEtuXb4W.yml) (2.4 KB)

---

<div class="post-metadata">

**Author:** ![nik202](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nik202/32/16098_2.png) [@nik202](https://forum.rasa.com/u/nik202)\
**Post date:** [February 4, 2022, 11:29pm UTC](https://forum.rasa.com/t/invalidconfigexception-cant-load-class-for-name-mappingpolicy-please-make-sure-to-provide-a-valid-name-or-module-path-and-to-register-it-using-the-defaultv1recipe-register-decorator/51133/8 "2022-02-04T23:29:54Z")

</div>

@khushboo_kumari

change this:

```auto
policies:
  - name: MemoizationPolicy
  - name: TEDPolicy
    max_history: 5
    epochs: 100
  - name: RulePolicy
    nlu_threshold: 0.4
    core_threshold: 0.4
    fallback_action_name: 'action_default_fallback'

```

and delete your pipeline and you will be good to go.

Please, I’d recommend you to please visit this page [How to ask a great question](http://forum.rasa.com/t/how-to-ask-a-great-question/15009). It will help us. Thanks.

---

<div class="post-metadata">

**Author:** ![khushboo\_kumari](https://avatars.discourse-cdn.com/v4/letter/k/839c29/32.png) [@khushboo\_kumari](https://forum.rasa.com/u/khushboo_kumari)\
**Post date:** [February 5, 2022, 1:38pm UTC](https://forum.rasa.com/t/invalidconfigexception-cant-load-class-for-name-mappingpolicy-please-make-sure-to-provide-a-valid-name-or-module-path-and-to-register-it-using-the-defaultv1recipe-register-decorator/51133/9 "2022-02-05T13:38:48Z")

</div>

This policies also did not work in my rasa webchat application. I also deleted my pipeline. The following error I got :

```auto
(install_rasa) E:\New folder\Anaconda3\chat>rasa train
YamlSyntaxException: Failed to read YAML. while parsing a block mapping
  in "<unicode string>", line 3, column 1:
    recipe: default.v1
    ^ (line: 3)
expected <block end>, but found '<block mapping start>'
  in "<unicode string>", line 34, column 3:
      policies:
      ^ (line: 34)

You can use https://yamlchecker.com/ to validate the YAML syntax of your file.

```

---

<div class="post-metadata">

**Author:** ![nik202](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nik202/32/16098_2.png) [@nik202](https://forum.rasa.com/u/nik202)\
**Post date:** [February 10, 2022, 1:13pm UTC](https://forum.rasa.com/t/invalidconfigexception-cant-load-class-for-name-mappingpolicy-please-make-sure-to-provide-a-valid-name-or-module-path-and-to-register-it-using-the-defaultv1recipe-register-decorator/51133/10 "2022-02-10T13:13:24Z")

</div>

@khushboo_kumari is this issue still persist?

---

<div class="post-metadata">

**Author:** ![akhilsajeevan](https://avatars.discourse-cdn.com/v4/letter/a/c77e96/32.png) [@akhilsajeevan](https://forum.rasa.com/u/akhilsajeevan)\
**Post date:** [January 18, 2024, 3:29pm UTC](https://forum.rasa.com/t/invalidconfigexception-cant-load-class-for-name-mappingpolicy-please-make-sure-to-provide-a-valid-name-or-module-path-and-to-register-it-using-the-defaultv1recipe-register-decorator/51133/11 "2024-01-18T15:29:47Z")

</div>

InvalidConfigException: Can’t load class for name ‘FallbackPolicy’. Please make sure to provide a valid name or module path and to register it using the ‘@DefaultV1Recipe.register’ decorator.
