Cannot retrieve class from path credentials

Hello everyone, I have a project which was running. I try to test RASA X, but it raised this error :

Process SpawnProcess-1: Traceback (most recent call last): File “c:\users\cyril\anaconda3\lib\site-packages\rasa\core\run.py”, line 48, in _create_single_channel input_channel_class = utils.class_from_module_path(channel) File “c:\users\cyril\anaconda3\lib\site-packages\rasa\core\utils.py”, line 66, in class_from_module_path raise ImportError(“Cannot retrieve class from path {}.”.format(module_path)) ImportError: Cannot retrieve class from path credentials.

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “c:\users\cyril\anaconda3\lib\multiprocessing\process.py”, line 297, in _bootstrap self.run() File “c:\users\cyril\anaconda3\lib\multiprocessing\process.py”, line 99, in run self._target(*self._args, **self._kwargs) File “c:\users\cyril\anaconda3\lib\site-packages\rasa\cli\x.py”, line 74, in _rasa_service jwt_method=args.jwt_method, File “c:\users\cyril\anaconda3\lib\site-packages\rasa\core\run.py”, line 132, in serve_application input_channels = create_http_input_channels(channel, credentials) File “c:\users\cyril\anaconda3\lib\site-packages\rasa\core\run.py”, line 37, in create_http_input_channels return [_create_single_channel(c, k) for c, k in all_credentials.items()] File “c:\users\cyril\anaconda3\lib\site-packages\rasa\core\run.py”, line 37, in return [_create_single_channel(c, k) for c, k in all_credentials.items()] File “c:\users\cyril\anaconda3\lib\site-packages\rasa\core\run.py”, line 56, in _create_single_channel “is a proper name of a class in a module.”.format(channel) Exception: Failed to find input channel class for ‘credentials’. Unknown input channel. Check your credentials configuration to make sure the mentioned channel is not misspelled. If you are creating your own channel, make sure it is a proper name of a class in a module.

I Don’t understand what it mean, so I come to you for help :slight_smile:

Best, Cyril

Hi there Cyril. Can you post the format of your credentials.yml (you can replace any sensitive info)? seems like you might have credentials: as a channel name in there, which is incorrect.

I got this

rest:

# you don’t need to provide anything here - this channel doesn’t

# require any credentials

rasa: url: “http://localhost:5002/api” facebook: verify: “#########” secret: “#########################” page-access-token: “####################################”

credentials: GOOGLE_KEY: “###################################”

It seems to be google key, but I previously used it to call in actions the Google Maps APIs

How did you access the credentials from the actions before? I don’t think this is the proper way to go about it — credentials.yml is for credentials for your input/output channels. It would be best in your custom actions to use environment variables for your keys and check them in the custom actions. E.g. we have a config here where we pick up environment variables and then can use them in our actions code here.

Okay, I was using for exemple : tutorial-rasa-google-assistant/credentials.yml at master · RasaHQ/tutorial-rasa-google-assistant · GitHub

I’ll do the way you say :blush:

Ah I see. Yes, a tutorial from last septemper is bound to be out of date as we’ve released like 3 new major releases since then. Sorry about that!