# AttributeError: module 'rasa\_core.channels' has no attribute 'channel'

**URL:** <https://forum.rasa.com/t/attributeerror-module-rasa-core-channels-has-no-attribute-channel/13918>\
**Category:** Rasa Open Source\
**Created:** [August 5, 2019, 7:34am UTC](https://forum.rasa.com/t/attributeerror-module-rasa-core-channels-has-no-attribute-channel/13918 "2019-08-05T07:34:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nikitajain18](https://avatars.discourse-cdn.com/v4/letter/n/3da27b/32.png) [@nikitajain18](https://forum.rasa.com/u/nikitajain18)\
**Post date:** [August 5, 2019, 7:34am UTC](https://forum.rasa.com/t/attributeerror-module-rasa-core-channels-has-no-attribute-channel/13918/1 "2019-08-05T07:34:50Z")

</div>

I am trying to deploy a chatbot using the SocketIO channel and this answer - [Connect rasa to a web site with the recommeded plataform](http://forum.rasa.com/t/connect-rasa-to-a-web-site-with-the-recommeded-plataform/4019/3)

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
            user_message_evt="user_uttered",
            # event name for messages sent from the bot
            bot_message_evt="bot_uttered",
            # socket.io namespace to use for the messages
            namespace=None
    )

# 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 -

```
socketio:
  user_message_evt: user_uttered
  bot_message_evt: bot_uttered
  session_persistence: false

```

and my endpoints.yml file is -

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

```

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

```
<div id="webchat"/>
<script src="https://storage.googleapis.com/mrbot-cdn/webchat-0.5.8.js"></script>
<script>
  WebChat.default.init({
    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: "/socket.io/",
    title: "Title",
    subtitle: "Subtitle",
    inputTextFieldHint: "Type a message...",
    connectingText: "Waiting for server...",
    hideWhenNotConnected: true,
    fullScreenMode: false,
    profileAvatar: "http://to.avat.ar",
    openLauncherImage: 'myCustomOpenImage.png',
    closeLauncherImage: 'myCustomCloseImage.png',
    params: {
      images: {
        dims: {
          width: 300,
          height: 200,
        }
      },
      storage: "session"
    }
  })
</script>

```

as detailed by the webchat github.The full error -

```
Traceback (most recent call last):
  File "connect.py", 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\agent.py", 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\run.py", line 91, in configure_app
    rasa.core.channels.channel.register(input_channels, app, route=route)
AttributeError: module 'rasa_core.channels' has no attribute 'channel'
```

---

<div class="post-metadata">

**Author:** ![nikitajain18](https://avatars.discourse-cdn.com/v4/letter/n/3da27b/32.png) [@nikitajain18](https://forum.rasa.com/u/nikitajain18)\
**Post date:** [August 5, 2019, 8:33am UTC](https://forum.rasa.com/t/attributeerror-module-rasa-core-channels-has-no-attribute-channel/13918/2 "2019-08-05T08:33:26Z")

</div>

I changed

`from rasa_core.channels.socketio import SocketIOInput`

to

`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:

![fallback](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/0/0d6acf10de3a35ac6468c1f77948938811788d74.png)

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

![unknown](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/5/5bfc501d46c9b969d408e0875f47ae24242fa23a.png)

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

---

<div class="post-metadata">

**Author:** ![amn41](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/amn41/32/20_2.png) [@amn41](https://forum.rasa.com/u/amn41)\
**Post date:** [August 5, 2019, 4:00pm UTC](https://forum.rasa.com/t/attributeerror-module-rasa-core-channels-has-no-attribute-channel/13918/3 "2019-08-05T16:00:52Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![vjaiswal693](https://avatars.discourse-cdn.com/v4/letter/v/e480ec/32.png) [@vjaiswal693](https://forum.rasa.com/u/vjaiswal693)\
**Post date:** [January 23, 2020, 5:38am UTC](https://forum.rasa.com/t/attributeerror-module-rasa-core-channels-has-no-attribute-channel/13918/4 "2020-01-23T05:38:50Z")

</div>

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