Forums

Cannot run my script in pythonanywhere

I am trying to run my discord bot's script, and then this ugly error popped up:

aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host discord.com:443 ssl:default [Connect call failed ('162.159.128.233', 443)]

It seems like the script refused to connect to discord and I don't know if that is discord's fault or pythonanywhere. If you have any solutions, please help!

Unfortunately the normal discord.py library won't work inside free accounts on PythonAnywhere -- free accounts need to use a proxy server (which we provide) in order to access other sites, and that library doesn't work with proxies.

However, it should work fine with a paid account -- so with our 30-day money-back guarantee, the best way to try things out is to upgrade (which I see you've already done since making your forum post) and then get things up and running. If you can't get it working, then you can always downgrade to a free account again and get in touch with us for a refund.