[Solved]NameError : name 'rasa' is not defind

Hi there,

I am trying to implement custom connector and also copied sample template code given in docs. Trying to execut it with run_app.py file, but whenever I send any message from front-end, it’s giving me error that ‘Rasa’ is not defined in my custom connector file.

Exception occurred while handling uri: 'http://localhost:5005/webhooks/rest/webhook'
Traceback (most recent call last):
  File "C:\Users\Prashant.Kamble\AppData\Local\Programs\Python\Python36\lib\site-packages\sanic\app.py", line 917, in handle_request
    response = await response
  File "C:\Users\Prashant.Kamble\Documents\R&D on rasa features\Rasa- Custom connector\MyIo.py", line 87, in receive
    text = self._extract_message(request)
NameError: name 'rasa' is not defined

You’ll have to add import rasa to the top of the file. Does that help?

Yeah thanks @erohmensing it worked :grinning::grinning:

Awesome!

Yup :grinning:. Actually I am trying to learn how to create custom channel for custom UI.

Cool, we’re always here for any issues you might run into. Just create a new post for them. What UI are you trying to connect?

Yup, there is one sample UI template from one of rasa member @JiteshGaikwad i.e on GitHub - JiteshGaikwad/Rasa_CustomUI-v0.1: Custom UI for Rasa Chatbot I am trying to integrate with my custom backend if worked it will be very very great actually. I am also very excited about it :grin::grin:.

If worked then I will be open to any UI related customization and then ahead I will put all together and create awesome bot’s with rasa for my companies new poc for clients.

And later on we will be making bot advanced based on all latest rasa features.

2 Likes