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

(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.

@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?

yes i migrated.

@khushboo_kumari share config.yml please?

config.yml (2.4 KB)

rasa version: 3.0.6

config.yml (2.4 KB)

@khushboo_kumari

change this:

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. It will help us. Thanks.

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

(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.
1 Like

@khushboo_kumari is this issue still persist?

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.