-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KeyError: 'ts' #26
Comments
I just got this as well. This might happen if the response from the Slack API is an error rather than a success (the |
I followed the README's instructions to the letter and I am hitting this error too:
Channel exists, and it is public. I added the bot to it too by "@" it. As an extra, "@" ing the bot for help (@incident_bot help) does not do anything. Logs don't show anything either. All URLs udated to use ngrok ones. As suggested by @danpalmer I added
Key is My setup:
Any suggestions EDIT:
|
I'm currently having the same issue and in my case it seems to be due to having way too many channels in Slack. In https://github.com/monzo/response/blob/master/response/settings/dev.py#L53-L56 the code tries to get the Slack channel ID by calling https://github.com/monzo/response/blob/master/response/settings/base.py#L191 My assumption is that this api call does not handle pagination properly, if you have more than 1000 channels in Slack the API call will return you a thousand and a cursor to get the next batch of channels. If get_channel_id doesn't find any channel then response will just set it to None and that pretty much breaks everything. |
This may also happen if you don't have enough permissions. You may need an additional scope. If you see the scope that is needed in slack oAuth permissions you may need to update your |
Any clues on this one? I get the
And I have an #incidents channel. We only have maybe a few hundred Slack channels (how would I know?). I'm going to try again now with a channel called UPDATE: Nope. I re-configured everything with |
For precision, the error is:
Is this a whole different issue than the |
The above responses are correct - this generally happens because the Slack API returns slightly weird responses - if there's an error, we get a response like this:
Previously, the code would only look for the We've done some refactoring recently to the Slack client (in #83 ) so that it now explicitly checks any response from the Slack API for |
In my case, this was caused by Slack having too many channels. Ever since I added the cursor code, I never see this error/problem anymore. |
We've released 0.1.1 which includes better error handling for Slack - it should be much easier to debug instances of this in future. If there are specific bugs around Slack handling (like the Slack channel cursoring @philovivero mentioned), please raise a new issue and we'll take it from there ❤️ https://github.com/monzo/response/releases/tag/release-0.1.1 |
Hi,
I am trying to create an incident and I am receiving:
Any clue?
The text was updated successfully, but these errors were encountered: