AttributeError: module 'rasa_core.channels' has no attribute 'channel'

I am trying to deploy a chatbot using the SocketIO channel and this answer - Connect rasa to a web site with the recommeded plataform

I am getting the error

AttributeError: module 'rasa_core.channels' has no attribute 'channel'

when I try to run this file -

from rasa_core.channels.socketio import SocketIOInput
from rasa_core.agent import Agent
from rasa_core.interpreter import NaturalLanguageInterpreter

# load your trained agent
interpreter = NaturalLanguageInterpreter.create('C:/Users/NJJainnew_ex/models/20190805-123059/nlu')
agent = Agent.load('C:/Users/NJJain/new_ex/models/20190805-123059', interpreter=interpreter)

input_channel = SocketIOInput(
            # event name for messages sent from the user
            # event name for messages sent from the bot
            # namespace to use for the messages

# set serve_forever=False if you want to keep the server running
s = agent.handle_channels([input_channel], 5005)

I have tried implementing this before and it worked then, don’t know the issue now. My credentials.yml file is -

  user_message_evt: user_uttered
  bot_message_evt: bot_uttered
  session_persistence: false

and my endpoints.yml file is -

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

This is what I added to the tag of my webpage -

<div id="webchat"/>
<script src=""></script>
    selector: "#webchat",
    initPayload: "/get_started",
    interval: 1000, // 1000 ms between each message
    customData: {"userId": "123"}, // arbitrary custom data. Stay minimal as this will be added to the socket
    socketUrl: "http://localhost:5005",
    socketPath: "/",
    title: "Title",
    subtitle: "Subtitle",
    inputTextFieldHint: "Type a message...",
    connectingText: "Waiting for server...",
    hideWhenNotConnected: true,
    fullScreenMode: false,
    profileAvatar: "",
    openLauncherImage: 'myCustomOpenImage.png',
    closeLauncherImage: 'myCustomCloseImage.png',
    params: {
      images: {
        dims: {
          width: 300,
          height: 200,
      storage: "session"

as detailed by the webchat github.The full error -

Traceback (most recent call last):
  File "", line 19, in <module>
    s = agent.handle_channels([input_channel], 5005)
  File "C:\Users\NJJain\AppData\Local\Continuum\anaconda3\envs\rasa\lib\site-packages\rasa\core\", line 679, in handle_channels
    app = run.configure_app(channels, cors, None, enable_api=False, route=route)
  File "C:\Users\NJJain\AppData\Local\Continuum\anaconda3\envs\rasa\lib\site-packages\rasa\core\", line 91, in configure_app, app, route=route)
AttributeError: module 'rasa_core.channels' has no attribute 'channel'

I changed

from rasa_core.channels.socketio import SocketIOInput


from rasa.core.channels.socketio import SocketIOInput

and updated all mentions of rasa_core with rasa.core, and did not get the error. But even though I can see the widget on the webpage, whatever I type, it only replies with:


This is what I’m getting after executing the first python file -


I have the ngrok server running on port 5005 as well.

can you try setting the environment variable LOG_LEVEL="DEBUG" to see if you get some more helpful output?

do we have to change something in our js file to deploy our bot to website or just including this codes will work