monzo / response

Monzo's real-time incident response and reporting tool ⚡️
MIT License
1.52k stars 165 forks source link

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

Closed Prifido closed 5 years ago

Prifido commented 5 years ago

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'

Prifido commented 5 years ago

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

danpalmer commented 5 years ago

I've just experienced the same, it turned out to be some missing documentation. I've updated the README in this PR: https://github.com/monzo/response/pull/126 – you should be able to apply this to resolve the problem.

milesbxf commented 5 years ago

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