I tried for a couple hours yesterday to get a discord bot I made on my pc in PyCharm up and running on Pythonista, however I got stuck with errors saying either 1) Cannot connect to host discord.com:433 ssl:True... OR if I run it a second time after that error 2) event loop is closed. So with that said, has anyone else ever gotten a discord bot running on Pythonista? Any help would be appreciated as Im still pretty new to python and just started tinkering with Pythonista yesterday, cheers!
Forum Archive
Is it possible to get discord.py up and running on Pythonista
etanemuway
Dec 14, 2020 - 21:19
Penguin Master
Dec 14, 2020 - 22:17
Hello! I had this problem. What you need to do is add this to the top of your code:import ssl
ssl.match_hostname = lambda cert, hostname: True and for the other error, just close and open the app. Hope it works for you!
bibiclancy
Dec 19, 2020 - 02:50
@Penguin-Master happy wheels said:
Hello! I had this problem. What you need to do is add this to the top of your code:
import ssl ssl.match_hostname = lambda cert, hostname: Trueand for the other error, just close and open the app. Hope it works for you!
Just what I needed, worked a treat, thank you!