-
Notifications
You must be signed in to change notification settings - Fork 834
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
asyncio RuntimeError stacktrace in SlackResponse, when getting paginated responses #626
Comments
Relevant part of the stacktrace:
|
Hi @ryan-lane, thanks for taking the time to research and write this up. I've tried reproducing the issue as you describe but the code seems to work as expected for me. Here is what I have:
Note that I don't have Looking a little closer at your error, it seems like the problem isn't about This is still a bug we need to solve, but I'm trying to collect a little more information so we can come up with a good solution. I'm looking at your PR (#632) and I'm not quite sure if and how it fixes the problem. The call to |
Let me close this issue now as #662 resolved it. |
👋 slackclient 2.6.0rc1 is out. The pre-release version contains fixes for your issue described here. One week later from now, we'll be releasing version 2.6.0 to PyPI. If you have a chance, could you try the release candidate version out and let us know your feedback? Thank you very much for being patient with this issue. |
Description
I'm trying to get paginated responses in users_list, by providing cursor and limit, but I'm getting a RuntimeError when doing so, because there's no existing asyncio loop in the thread:
https://github.com/slackapi/python-slackclient/blob/e06b4d7b415aac439ec9d5456ef756aaed4083e9/slack/web/slack_response.py#L135
Applying the same pattern that base client uses for getting an event loop fixes the issue:
https://github.com/slackapi/python-slackclient/blob/e06b4d7b415aac439ec9d5456ef756aaed4083e9/slack/web/base_client.py#L49-L56
What type of issue is this? (place an
x
in one of the[ ]
)Requirements (place an
x
in each of the[ ]
)Bug Report
Filling out the following details about bugs will help us solve your issue sooner.
Reproducible in:
slackclient version: 2.5.0
python version: 3.x
OS version(s): Ubuntu bionic
Steps to reproduce:
Expected result:
I expect to get paginated results.
Actual result:
I get a RuntimeError
The text was updated successfully, but these errors were encountered: