scrapinghub / slackbot

A chat bot for Slack (https://slack.com).
MIT License
1.26k stars 394 forks source link

Getting TypeError: list() got an unexpected keyword argument 'cursor' from starting app #231

Open s905060 opened 2 years ago

s905060 commented 2 years ago
 File "/usr/local/lib/python3.9/dist-packages/slackbot/bot.py", line 20, in __init__
    self._client = SlackClient(
  File "/usr/local/lib/python3.9/dist-packages/slackbot/slackclient.py", line 60, in __init__
    self.rtm_connect()
  File "/usr/local/lib/python3.9/dist-packages/slackbot/slackclient.py", line 65, in rtm_connect
    self.parse_slack_login_data(reply)
  File "/usr/local/lib/python3.9/dist-packages/slackbot/slackclient.py", line 87, in parse_slack_login_data
    self.parse_user_data(self.list_users())
  File "/usr/local/lib/python3.9/dist-packages/slackbot/slackclient.py", line 78, in list_users
    return webapi_generic_list(self.webapi, 'users', 'members')
  File "/usr/local/lib/python3.9/dist-packages/slackbot/slackclient.py", line 30, in webapi_generic_list
    response = getattr(webapi, resource_key).list(**args)
TypeError: list() got an unexpected keyword argument 'cursor'
hugolgst commented 1 year ago

Did you manage to solve it?

savio-tran commented 1 year ago

Have ever find a solution for this? I'm getting the same error.

savio-tran commented 1 year ago

[10/27/2022 10:39:36] Getting next page for users (1000 collected) Traceback (most recent call last): File "run.py", line 23, in main() File "run.py", line 19, in main bot = Bot() File "/src/lins05/slackbot/slackbot/bot.py", line 20, in init self._client = SlackClient( File "/src/lins05/slackbot/slackbot/slackclient.py", line 60, in init self.rtm_connect() File "/src/lins05/slackbot/slackbot/slackclient.py", line 65, in rtm_connect self.parse_slack_login_data(reply) File "/src/lins05/slackbot/slackbot/slackclient.py", line 87, in parse_slack_login_data self.parse_user_data(self.list_users()) File "/src/lins05/slackbot/slackbot/slackclient.py", line 78, in list_users return webapi_generic_list(self.webapi, 'users', 'members') File "/src/lins05/slackbot/slackbot/slackclient.py", line 30, in webapi_generic_list response = getattr(webapi, resource_key).list(**args) TypeError: list() got an unexpected keyword argument 'cursor'

veselyvojtech commented 1 year ago

This list method of the Users class is called here. It doesn't expect the cursor argument.