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

Error with Slack API #5038

Open
stevegon3 opened this issue Nov 7, 2019 · 0 comments
Open

Error with Slack API #5038

stevegon3 opened this issue Nov 7, 2019 · 0 comments

Comments

@stevegon3
Copy link

When using Python3.7 Anaconda Windows 10 on Jupyter with the Slack API you get an error. Slack has confirmed this is a problem with Jupyter and it does work when using the command line Python instead of Jupyter.
The package name is slack and it happens when doing a simple post message
client.chat_postMessage(

RuntimeError Traceback (most recent call last)
in
11 client.chat_postMessage(
12 channel="GQ0GJDNE8",
---> 13 text="Hello from your app! 🎉"
14 )

C:\ProgramData\Anaconda3\lib\site-packages\slack\web\client.py in chat_postMessage(self, channel, **kwargs)
380 """
381 kwargs.update({"channel": channel})
--> 382 return self.api_call("chat.postMessage", json=kwargs)
383
384 def chat_scheduleMessage(

C:\ProgramData\Anaconda3\lib\site-packages\slack\web\base_client.py in api_call(self, api_method, http_verb, files, data, params, json, headers, auth)
170 return future
171
--> 172 return self._event_loop.run_until_complete(future)
173
174 def _validate_xoxp_token(self):

C:\ProgramData\Anaconda3\lib\asyncio\base_events.py in run_until_complete(self, future)
569 future.add_done_callback(_run_until_complete_cb)
570 try:
--> 571 self.run_forever()
572 except:
573 if new_task and future.done() and not future.cancelled():

C:\ProgramData\Anaconda3\lib\asyncio\base_events.py in run_forever(self)
524 self._check_closed()
525 if self.is_running():
--> 526 raise RuntimeError('This event loop is already running')
527 if events._get_running_loop() is not None:
528 raise RuntimeError(

RuntimeError: This event loop is already running

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