"rasa run" is giving ruamel.yaml.constructor.DuplicateKeyError

Hi,

I am doing the following to connect rasa with slack using ngrok : a) I am running rasa run actions on 1st anaconda command prompt b) I am running rasa run on a 2nd anaconda command prompt , while the action server starts running on 1st anaconda prompt, the 2nd anaconda prompt starts giving this error : ruamel.yaml.constructor.DuplicateKeyError .

I have read online, but I am not able to follow which file to edit, where to edit to put this error to sleep. Can someone help while explaining in the most simplest of ways how to get rid of this error…

File “c:\users\welcome\anaconda3\envs\rasa_venv\lib\site-packages\ruamel\yaml\constructor.py”, line 111, in get_single_data return self.construct_document(node) File “c:\users\welcome\anaconda3\envs\rasa_venv\lib\site-packages\ruamel\yaml\constructor.py”, line 121, in construct_document for _dummy in generator: File “c:\users\welcome\anaconda3\envs\rasa_venv\lib\site-packages\ruamel\yaml\constructor.py”, line 713, in construct_yaml_map value = self.construct_mapping(node) File “c:\users\welcome\anaconda3\envs\rasa_venv\lib\site-packages\ruamel\yaml\constructor.py”, line 430, in construct_mapping return BaseConstructor.construct_mapping(self, node, deep=deep) File “c:\users\welcome\anaconda3\envs\rasa_venv\lib\site-packages\ruamel\yaml\constructor.py”, line 247, in construct_mapping if self.check_mapping_key(node, key_node, mapping, key, value): File “c:\users\welcome\anaconda3\envs\rasa_venv\lib\site-packages\ruamel\yaml\constructor.py”, line 285, in check_mapping_key raise DuplicateKeyError(*args) ruamel.yaml.constructor.DuplicateKeyError: while constructing a mapping in “”, line 5, column 1 found duplicate key “rasa” with value “{}” (original value: “None”) in “”, line 34, column 1

To suppress this check see: http://yaml.readthedocs.io/en/latest/api.html#duplicate-keys

Duplicate keys will become an error in future releases, and are errors by default when using the new API.

hey @arundeep, welcome to the community, can you show your domain.yml file?

config.yml (533 Bytes) credentials.yml (986 Bytes) domain.yml (3.6 KB)

Attached, domain, credentials and config.yml files

hey @arundeep, I see the duplicate keys are present in credentials.yml file:

image

I have tried putting # in the 1st rasa, and url as well - still this error.

I see you are trying to add another key for actions endpoint, you can add it in the endpoints.yml using the below lines:

action_endpoint:
 url: "http://localhost:5055/webhook"

To sum it up, in the endpoints.yml : i add the line that you told me. Also, what about the credentials rasa entry , will that remain or need to take it out ?

you can leave as it is

ok, let me try. Thanks.

I just check, this entry is already present in my endpoints file.

Ok fine.

did you removed the duplicate key?

you told me to keep them as it is, which one do i need to remove ?

this way:

ok, let me see.

Great, it is working now. Thank a ton.

Glad. It worked out :slight_smile:

1 Like

hey @arundeep, can you please mark the solution on the thread which solved the issue so that it will be helpful for others, as I see you have marked on solution on the wrong thread.

is it ok, now

1 Like

Yup thanks for the correction :blush: