monzo / response

Monzo's real-time incident response and reporting tool ⚡️

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AttributeError: 'Settings' object has no attribute 'SLACK_CLIENT'

Prifido opened this issue · comments

I installed the response app using pip. After attempting to use the slash command to create an incident, I received the following error. Could anyone provide some guidance on how to address it?:

AttributeError: 'Settings' object has no attribute 'SLACK_CLIENT'

Here is the full error message. Some guidance on this would be greatly appreciated:

Traceback (most recent call last):
File "/Users/username/slack_response/lib/python3.7/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/Users/username/slack_response/lib/python3.7/site-packages/django/core/handlers/base.py", line 115, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/Users/username/slack_response/lib/python3.7/site-packages/django/core/handlers/base.py", line 113, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/Users/username/slack_response/lib/python3.7/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
return view_func(*args, **kwargs)
File "/Users/username/slack_response/lib/python3.7/site-packages/response/slack/authentication.py", line 34, in wrapper
return f(*args, **kwargs)
File "/Users/username/slack_response/lib/python3.7/site-packages/response/slack/views.py", line 51, in slash_command
dialog.send_open_dialog(INCIDENT_REPORT_DIALOG, trigger_id)
File "/Users/username/slack_response/lib/python3.7/site-packages/response/slack/dialog_builder.py", line 40, in send_open_dialog
return settings.SLACK_CLIENT.dialog_open(
File "/Users/username/slack_response/lib/python3.7/site-packages/django/conf/init.py", line 80, in getattr
val = getattr(self._wrapped, name)
AttributeError: 'Settings' object has no attribute 'SLACK_CLIENT'
[29/Aug/2019 11:28:57] "POST /slack/slash_command HTTP/1.1" 500 82319

I've just experienced the same, it turned out to be some missing documentation. I've updated the README in this PR: #126 – you should be able to apply this to resolve the problem.

I've just merged #126, so closing this. Thanks for reporting and thanks for the PR!