Skip to content

aiohttp.client_exceptions.ClientConnectorSSLError with v2 #472

@staticdev

Description

@staticdev

Description

I was following the Migration Guide and some calls now throw exceptions which didn't occur back to 1.3.x version. There is nothing in the migration documentation about that.

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

Reproducible in:

slackclient version: 2.1.0

python version: 3.7.3

OS version(s): Ubuntu 19.04

Steps to reproduce:

from os import environ
from slack import WebClient
slack_client = WebClient(environ["SLACK_API_TOKEN"], timeout=30)
api_call = slack_client.api_call('users.list')
if api_call.get('ok'):
    # retrieve all users so we can find our bot
    users = api_call.get('members')
    for user in users:
        if 'name' in user and user.get('name') == SLACK_BOT_NAME:
            BOT_ID = user.get('id')
else:
    print('Could not reach Slack with your SLACK_BOT_TOKEN. Please check if ' +
          'your SLACK_BOT_TOKEN and SLACK_BOT_NAME are both correct.')
    exit(1)

Expected result:

Code goes through IF statement to check the call result.

Actual result:

Exceptions are given such as:
aiohttp.client_exceptions.ClientConnectorSSLError: Cannot connect to host www.slack.com:443 ssl:None [[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:847)]

Attachments:

Sample project being migrated: https://github.com/staticdev/k8s-python-slackbot/blob/master/echobot.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    Version: 2xquestionM-T: User needs support to use the project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions