1

I was running my discord.py bot locally and got this error

raise client_error(req.connection_key, exc) from exc aiohttp.client_exceptions.ClientConnectorError: 
Cannot connect to host discordapp.com:443 ssl:None [Connect call failed ('162.159.133.233', 443)]

I am using my campus network with proxy to run the bot. So what is the reason?

client = commands.Bot(command_prefix=getPrefix,case_insensitive = True)
client.remove_command('help')
@client.event
async def on_ready():
    await client.change_presence(status=discord.Status.online,activity=discord.Game(name='RPG Help at >help'))
    print('Logged in')
    print('...')
client.run('TOKEN')

I think there is no problem with my code, as when I run this using mobile data it works fine, but the error occurs only with my institute network.

tJoyd
  • 21
  • 1
  • 3
  • Could you share some code on how you're initialising the bot, please? – JGreatorex Jul 18 '19 at 12:51
  • `client = commands.Bot(command_prefix=getPrefix,case_insensitive = True) client.remove_command('help') @client.event async def on_ready(): await client.change_presence(status=discord.Status.online,activity=discord.Game(name='RPG Help at >help')) print('Logged in') print('...') client.run('Token')` – tJoyd Jul 18 '19 at 15:55
  • Please [edit] the question to include the code, and properly format it using any of the code formatting options. If you don't have a preferred code format method you can use the "format as code" button which indents code by four spaces. – Jason Aller Jul 18 '19 at 16:16
  • > when I run this using mobile data it works fine, but the error occurs only with my institute network. Does your campus have a webfilter? Can you open Discord on campus without the use of a VPN or proxy? – c-x-berger Oct 11 '19 at 04:47
  • Does this answer your question? https://stackoverflow.com/questions/63347818/aiohttp-client-exceptions-clientconnectorerror-cannot-connect-to-host-stackover – 0dminnimda Jan 09 '21 at 20:05

0 Answers0