rhefner1 / c3po

C-3PO GroupMe Bot
Apache License 2.0
0 stars 0 forks source link

Motivate doesn't work all of the time #152

Closed rhefner1 closed 7 years ago

rhefner1 commented 8 years ago

In the normal phrase c3po Motivate Person (notice the capital m), we get the following traceback:

Traceback (most recent call last):
  File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 267, in Handle
    result = handler(dict(self._environ), self._StartResponse)
  File "/base/data/home/apps/s~c3po-bot/1.389249409104169646/lib/flask/app.py", line 1836, in __call__
    return self.wsgi_app(environ, start_response)
  File "/base/data/home/apps/s~c3po-bot/1.389249409104169646/lib/flask/app.py", line 1820, in wsgi_app
    response = self.make_response(self.handle_exception(e))
  File "/base/data/home/apps/s~c3po-bot/1.389249409104169646/lib/flask/app.py", line 1403, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/base/data/home/apps/s~c3po-bot/1.389249409104169646/lib/flask/app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/base/data/home/apps/s~c3po-bot/1.389249409104169646/lib/flask/app.py", line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/base/data/home/apps/s~c3po-bot/1.389249409104169646/lib/flask/app.py", line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/base/data/home/apps/s~c3po-bot/1.389249409104169646/lib/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/base/data/home/apps/s~c3po-bot/1.389249409104169646/lib/flask/app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/base/data/home/apps/s~c3po-bot/1.389249409104169646/c3po/provider/groupme/receive.py", line 50, in receive_message
    msg.process_message()
  File "/base/data/home/apps/s~c3po-bot/1.389249409104169646/c3po/message.py", line 91, in process_message
    response, should_mention = responder(self)
  File "/base/data/home/apps/s~c3po-bot/1.389249409104169646/c3po/persona/util.py", line 67, in wrapper
    return func(*args, **kwargs), should_add_mention
  File "/base/data/home/apps/s~c3po-bot/1.389249409104169646/c3po/persona/base.py", line 67, in motivate
    name = msg.text_chunks[1]
IndexError: list index out of range
rhefner1 commented 8 years ago

Need to modify regex to allow for case insensitivity