Skip to content
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

slacker.Error: limit_required #234

Open
Johboh opened this issue Oct 30, 2022 · 0 comments
Open

slacker.Error: limit_required #234

Johboh opened this issue Oct 30, 2022 · 0 comments

Comments

@Johboh
Copy link

Johboh commented Oct 30, 2022

Hi!
After upgrading to 1.0.1, I get the following error when starting the bot:

bot_1     | Traceback (most recent call last):
bot_1     |   File "run.py", line 9, in <module>
bot_1     |     main()
bot_1     |   File "run.py", line 5, in main
bot_1     |     bot = Bot()
bot_1     |   File "/usr/local/lib/python3.8/site-packages/slackbot/bot.py", line 20, in __init__
bot_1     |     self._client = SlackClient(
bot_1     |   File "/usr/local/lib/python3.8/site-packages/slackbot/slackclient.py", line 60, in __init__
bot_1     |     self.rtm_connect()
bot_1     |   File "/usr/local/lib/python3.8/site-packages/slackbot/slackclient.py", line 65, in rtm_connect
bot_1     |     self.parse_slack_login_data(reply)
bot_1     |   File "/usr/local/lib/python3.8/site-packages/slackbot/slackclient.py", line 87, in parse_slack_login_data
bot_1     |     self.parse_user_data(self.list_users())
bot_1     |   File "/usr/local/lib/python3.8/site-packages/slackbot/slackclient.py", line 78, in list_users
bot_1     |     return webapi_generic_list(self.webapi, 'users', 'members')
bot_1     |   File "/usr/local/lib/python3.8/site-packages/slackbot/slackclient.py", line 30, in webapi_generic_list
bot_1     |     response = getattr(webapi, resource_key).list(**args)
bot_1     |   File "/usr/local/lib/python3.8/site-packages/slacker/__init__.py", line 331, in list
bot_1     |     return self.get('users.list', params={'presence': int(presence)})
bot_1     |   File "/usr/local/lib/python3.8/site-packages/slacker/__init__.py", line 118, in get
bot_1     |     return self._request(
bot_1     |   File "/usr/local/lib/python3.8/site-packages/slacker/__init__.py", line 102, in _request
bot_1     |     raise Error(response.error)
bot_1     | slacker.Error: limit_required

Looking at the slack API under the limit parameter, it says:

 If the collection is too large you may experience limit_required or HTTP 500 errors.

So I assume that the slack workspace I'm trying to use this bot on has too many users (~11000).
Before version 1.0.0 started to fail at login, the 1.0.0 version did work well without any need for a limit (but new users has joined since then and might have hit the upper limit).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant