Rocket.chat integration causes 'NoneType' object has no attribute 'startswith' - Getting Started with Rasa / Tutorials, Resources & Videos - Rasa Community Forum

👋 Introducing the Rasa Playground

Rocket.chat integration causes ‘NoneType’ object has no attribute ‘startswith’

post by AndreD on Dec 6, 2019

Hi everyone,

I got stuck in my integration work with rockt.chat. Following the tutorials on both sides I got the servers speak to each other but now rasa seems to miss something.

Anyone experienced something similar?

BR

Andre

post by AndreD on Dec 7, 2019

Looking into the server log I found the following:

2019-12-06 14:53:56 DEBUG rasa_core.processor - Received user message ‘None’
2019-12-06 14:53:56 ERROR rasa_core.server - Exception on /webhooks/rest/webhook [POST]
Traceback (most recent call last):
  File ".../site-packages/flask/app.py", line 2446, in wsgi_app
    response = self.full_dispatch_request()
  File ".../site-packages/flask/app.py", line 1951, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File ".../site-packages/flask_cors/extension.py", line 161, in wrapped_function
    return cors_after_request(app.make_response(f(*args, **kwargs)))
  File ".../site-packages/flask/app.py", line 1820, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File ".../site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File ".../site-packages/flask/app.py", line 1949, in full_dispatch_request
    rv = self.dispatch_request()
  File ".../site-packages/flask/app.py", line 1935, in dispatch_request
    return self.view_functionsrule.endpoint
  File ".../site-packages/rasa_core/channels/channel.py", line 372, in receive
    input_channel=self.name()))
  File ".../site-packages/rasa_core/agent.py", line 322, in handle_message
    return processor.handle_message(message)
  File ".../site-packages/rasa_core/processor.py", line 73, in handle_message
    tracker = self.log_message(message)
  File ".../site-packages/rasa_core/processor.py", line 119, in log_message
    self._handle_message_with_tracker(message, tracker)
  File ".../site-packages/rasa_core/processor.py", line 263, in _handle_message_with_tracker
    parse_data = self._parse_message(message)
  File ".../site-packages/rasa_core/processor.py", line 242, in _parse_message
    if message.text.startswith(INTENT_MESSAGE_PREFIX):
AttributeError: ‘NoneType’ object has no attribute ‘startswith’
127.0.0.1 - - [2019-12-06 14:53:56] “POST /webhooks/rest/webhook HTTP/1.1” 500 443 0.005126

post by AndreD on Dec 7, 2019

I found this issue here, which seems to cause exactly the same server output:

curl -XPOST http://localhost:5005/webhooks/rest/webhook -d '{"sender": "forexample", "text": "hello"}' -H "Content-type: application/json"

I tried then the same, but changed “text” into “message” - and finally it looks fine …

So, what might be wrong here? The Integration on rocket.chat side?

Thanks for some hints ! BR ANdre