I'm trying to access Slack in python 3.8 but i'm unable to pass the first step. Here is my code :
import slack
slack_token="xoxp-*******-*******-*******-*******"
client = slack.WebClient(slack_token)
client.chat_postMessage(
channel="XXXXXXXXXX",
text="Hello from your app! :tada:"
)
print('hello')
and here is the error:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/aiohttp/connector.py", line 936, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs) # type: ignore # noqa
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/asyncio/base_events.py", line 1046, in create_connection
transport, protocol = await self._create_connection_transport(
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/asyncio/base_events.py", line 1076, in _create_connection_transport
await waiter
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/asyncio/sslproto.py", line 529, in data_received
ssldata, appdata = self._sslpipe.feed_ssldata(data)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/asyncio/sslproto.py", line 189, in feed_ssldata
self._sslobj.do_handshake()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/ssl.py", line 944, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)
venv config:
pip3 freeze
aiohttp==3.6.2
async-timeout==3.0.1
attrs==19.3.0
certifi==2019.11.28
chardet==3.0.4
idna==2.8
multidict==4.7.4
pipenv==2018.11.26
slack==0.0.2
slackclient==2.5.0
virtualenv==16.7.9
virtualenv-clone==0.5.3
yarl==1.4.2