I get this everytime I make a new bot. Please help.
> Logging into Discord...
> [19/01/2017 17:30] ERROR red <module> 618: Fatal exception, attempting graceful logout
> Traceback (most recent call last):
> File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/aiohttp/connector.py", line 601, in _create_direct_connection
> local_addr=self._local_addr)
> File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/base_events.py", line 713, in create_connection
> sock, protocol_factory, ssl, server_hostname)
> File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/base_events.py", line 736, in _create_connection_transport
> yield from waiter
> File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/futures.py", line 361, in __iter__
> yield self # This tells Task to wait for completion.
> File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/tasks.py", line 296, in _wakeup
> future.result()
> File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/futures.py", line 274, in result
> raise self._exception
> File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/sslproto.py", line 492, in data_received
> ssldata, appdata = self._sslpipe.feed_ssldata(data)
> File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/sslproto.py", line 200, in feed_ssldata
> self._sslobj.do_handshake()
> File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/ssl.py", line 633, in do_handshake
> self._sslobj.do_handshake()
> ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:645)
>
> The above exception was the direct cause of the following exception:
>
> Traceback (most recent call last):
> File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/aiohttp/connector.py", line 304, in connect
> yield from self._create_connection(req)
> File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/aiohttp/connector.py", line 578, in _create_connection
> transport, proto = yield from self._create_direct_connection(req)
> File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/aiohttp/connector.py", line 624, in _create_direct_connection
> (req.host, req.port, exc.strerror)) from exc
> aiohttp.errors.ClientOSError: [Errno 1] Can not connect to discordapp.com:443 [[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:645)]
>
> The above exception was the direct cause of the following exception:
>
> Traceback (most recent call last):
> File "red.py", line 599, in <module>
> loop.run_until_complete(main(bot))
> File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/base_events.py", line 387, in run_until_complete
> return future.result()
> File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/futures.py", line 274, in result
> raise self._exception
> File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/tasks.py", line 241, in _step
> result = coro.throw(exc)
> File "red.py", line 584, in main
> bot=not bot.settings.self_bot)
> File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/discord/client.py", line 416, in login
> yield from getattr(self, '_login_' + str(n))(*args, **kwargs)
> File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/discord/client.py", line 346, in _login_1
> data = yield from self.http.static_login(token, bot=is_bot)
> File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/discord/http.py", line 195, in static_login
> data = yield from self.get(self.ME)
> File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/discord/http.py", line 105, in request
> r = yield from self.session.request(method, url, **kwargs)
> File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/aiohttp/client.py", line 555, in __iter__
> resp = yield from self._coro
> File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/aiohttp/client.py", line 198, in _request
> conn = yield from self._connector.connect(req)
> File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/aiohttp/connector.py", line 314, in connect
> .format(key, exc.strerror)) from exc
> aiohttp.errors.ClientOSError: [Errno 1] Cannot connect to host discordapp.com:443 ssl:True [Can not connect to discordapp.com:443 [[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:645)]]
> Task was destroyed but it is pending!
> task: <Task pending coro=<Streams.stream_checker() running at /Users/John/Music/Bot/Red-DiscordBot/cogs/streams.py:417> wait_for=<Future pending cb=[Task._wakeup()]>>
> Red has been terminated. Exit code: 1
> Press enter to continue.
>
Windows server?
The connection to Discord is being blocked on the server, please check your firewall settings, and so on. If you're running Windows Server. You'll have to visit the Discord site with IE on the server to acquire the SSL certificate.
This is on a mac, and I will check my firewall, when I get home tomorrow.
Thanks.
I don't know if you still have the issue but this is probably it:
https://github.com/Rapptz/discord.py/issues/423#issuecomment-272093801
Adding more informations:
Apparently navigating to Applications/Python 3.6/ and double clicking Install Certificates.command fixes this issue
Adding more informations:
Apparently navigating toApplications/Python 3.6/and double clickingInstall Certificates.commandfixes this issue
Thank you, this works perfectly. Running 3.8.2.
When I go to Applications/Python 3.8.2/ and open the InstallCertificates.command it gives me this error
``-- pip install --upgrade certifi
Collecting certifi
Using cached certifi-2020.4.5.1-py2.py3-none-any.whl (157 kB)
Installing collected packages: certifi
Attempting uninstall: certifi
Found existing installation: certifi 2017.11.5
Uninstalling certifi-2017.11.5:
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/certifi-2017.11.5.dist-info/RECORD'
Consider using the--user` option or check the permissions.
WARNING: You are using pip version 20.1; however, version 20.1.1 is available.
You should consider upgrading via the '/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -m pip install --upgrade pip' command.
Traceback (most recent call last):
File "
File "
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8', '-E', '-s', '-m', 'pip', 'install', '--upgrade', 'certifi']' returned non-zero exit status 1.
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
[Process completed]
please help i just want to build my bot : (
This is a very old issue and support questions shouldn't be asked in GH issues. If you need help setting up Red, you should ask on our discord server: https://discord.gg/red
sorry I will make a new issue or join the server(or both)
Adding more informations:
Apparently navigating toApplications/Python 3.6/and double clickingInstall Certificates.commandfixes this issue
Thank you, you are a kind programmer.
Adding more informations:
Apparently navigating toApplications/Python 3.6/and double clickingInstall Certificates.commandfixes this issue
confirmed that this worked. using Mac Catalina, python 3.8
Most helpful comment
Adding more informations:
Apparently navigating to
Applications/Python 3.6/and double clickingInstall Certificates.commandfixes this issue