Rasa-x start server with custom channel

Hi, I get error when I start rasa-x with command rasa x

I have created a custom socketio channel and it says module not found. The same when I run with rasa run command it runs.

Can anyone please sugggest me what the issue is. I have attacehd erro log below.

(rasaenv) ameen@dragon:~/Documents/Projects/ej-bot$ rasa x
Rasa X currently only supports a SQLite tracker store with path 'tracker.db' when running locally. You can deploy Rasa X with Docker (https://rasa.com/docs/rasa-x/deploy/) if you want to use other tracker store configurations.
? Do you want to continue with the default SQLite tracker store?  Yes                                                                                                                                        
Starting Rasa X in local mode... πŸš€
Process SpawnProcess-1:
Traceback (most recent call last):
  File "/home/ameen/Documents/Projects/ej-bot/rasaenv/lib/python3.6/site-packages/rasa/core/run.py", line 48, in _create_single_channel
    input_channel_class = class_from_module_path(channel)
  File "/home/ameen/Documents/Projects/ej-bot/rasaenv/lib/python3.6/site-packages/rasa/utils/common.py", line 188, in class_from_module_path
    m = importlib.import_module(module_name)
  File "/home/ameen/Documents/Projects/ej-bot/rasaenv/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 941, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 941, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'custom'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/usr/lib/python3.6/multiprocessing/process.py", line 93, in run
    self._target(*self._args, **self._kwargs)
  File "/home/ameen/Documents/Projects/ej-bot/rasaenv/lib/python3.6/site-packages/rasa/cli/x.py", line 78, in _rasa_service
    jwt_method=args.jwt_method,
  File "/home/ameen/Documents/Projects/ej-bot/rasaenv/lib/python3.6/site-packages/rasa/core/run.py", line 136, in serve_application
    input_channels = create_http_input_channels(channel, credentials)
  File "/home/ameen/Documents/Projects/ej-bot/rasaenv/lib/python3.6/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 "/home/ameen/Documents/Projects/ej-bot/rasaenv/lib/python3.6/site-packages/rasa/core/run.py", line 37, in <listcomp>
    return [_create_single_channel(c, k) for c, k in all_credentials.items()]
  File "/home/ameen/Documents/Projects/ej-bot/rasaenv/lib/python3.6/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 'custom.channel.mysocket.SocketIOInput'. 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.
^CGoodbye πŸ‘‹

Can you post the directory structure of your rasa project and the relevant custom code?

My project folder structure

> - bot
> -- actions
> -- data
> -- models
> -- custom
> --- channel
> ---- socketio.py

in my socketio.py file i have SocketIOInput class, I have copied the socketio.py file from rasa core/channels folder in to that custom folder

seems like your file isn’t named mysocket.py but rather socketio.py – I believe the path in your credentials should be custom.channel.socketio.SocketIOInput instead of custom.channel.mysocket.SocketIOInput

Sorry, i have changes the filename after few tries. The issue was solved. I used the socketio file of rasa 1.2x version but rasa-x version i used was lower than that. I think this was the problem.

Thanks @erohmensing, still I am learning.

No worries! Glad you figured it out!