Skip to content

Intermittent concurrent.futures._base.TimeoutError with run_async=True #476

@smslack

Description

@smslack

Description

When i try to post a message to slack channel using one of the basic example to post a message to a channel, i see an error saying "concurrent.futures._base.TimeoutError". I am using python 3.6.7 on Ubuntu 18.0.4 with slackclient 2.

What type of issue is this? (place an x in one of the [ ])

  • bug
  • enhancement (feature request)
  • question
  • documentation related
  • testing related
  • discussion

Requirements (place an x in each of the [ ])

  • I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've searched for any related issues and avoided creating a duplicate issue.

Bug Report

Filling out the following details about bugs will help us solve your issue sooner.

Reproducible in:

slackclient version: 2

python version: 3.6.7

OS version(s): Ubuntu 18.0.4

Steps to reproduce:

  1. Set up virtualenv with python 3.6.7
  2. Example code from tutorial
  3. python3 testnotify.py

My Code:

import slack

client = slack.WebClient(token='SLACK_API_TOKEN')

response = client.chat_postMessage(
    channel='#sm-test',
    text="Hello world!")
assert response["ok"]
assert response["message"]["text"] == "Hello world!"

Expected result:

I am expecting to see the message 'Hello World!' posted to the slack channel '#sm-test'

Actual result:

I am seeing the following Error:

Traceback (most recent call last):
  File "testnotify.py", line 9, in <module>
    text="Hello world!")
  File "/usr/local/lib/python3.6/dist-packages/slack/web/client.py", line 332, in chat_postMessage
    return self.api_call("chat.postMessage", json=kwargs)
  File "/usr/local/lib/python3.6/dist-packages/slack/web/base_client.py", line 154, in api_call
    return self._event_loop.run_until_complete(future)
  File "/usr/lib/python3.6/asyncio/base_events.py", line 473, in run_until_complete
    return future.result()
  File "/usr/local/lib/python3.6/dist-packages/slack/web/base_client.py", line 211, in _send
    http_verb=http_verb, api_url=api_url, req_args=req_args
  File "/usr/local/lib/python3.6/dist-packages/slack/web/base_client.py", line 240, in _request
    async with session.request(http_verb, api_url, **req_args) as res:
  File "/usr/local/lib/python3.6/dist-packages/aiohttp/client.py", line 1005, in __aenter__
    self._resp = await self._coro
  File "/usr/local/lib/python3.6/dist-packages/aiohttp/client.py", line 575, in _request
    break
  File "/usr/local/lib/python3.6/dist-packages/aiohttp/helpers.py", line 585, in __exit__
    raise asyncio.TimeoutError from None
concurrent.futures._base.TimeoutError

Attachments:

Logs, screenshots, screencast, sample project, funny gif, etc.

Metadata

Metadata

Assignees

Labels

Version: 2xarea:concurrencyIssues and PRs related to concurrencybugM-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions