Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error in the asyncio plugin
#1
Exclamation 
I was making an AI bot for discord, everything is correct in the script, no errors, but the console finds errors in the asyncio plugin. I was running scripts in pythonanywhere. Python version: 3.10
Here are the errors:

Error:
Traceback (most recent call last): File "/home/Maden4ik/.local/lib/python3.10/site-packages/aiohttp/connector.py", line 1025, in _wrap_create_connection return await self._loop.create_connection(*args, **kwargs) File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1064, in create_connection raise exceptions[0] File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1049, in create_connection sock = await self._connect_sock( File "/usr/local/lib/python3.10/asyncio/base_events.py", line 960, in _connect_sock await self.sock_connect(sock, address) File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 500, in sock_connect return await fut File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 535, in _sock_connect_cb raise OSError(err, f'Connect call failed {address}') ConnectionRefusedError: [Errno 111] Connect call failed ('162.159.135.232', 443) The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/Maden4ik/bot/GeminiSimple.py", line 184, in <module> bot.run(DISCORD_BOT_TOKEN) File "/home/Maden4ik/.local/lib/python3.10/site-packages/discord/client.py", line 869, in run asyncio.run(runner()) File "/usr/local/lib/python3.10/asyncio/runners.py", line 44, in run return loop.run_until_complete(main) File "/usr/local/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete return future.result() File "/home/Maden4ik/.local/lib/python3.10/site-packages/discord/client.py", line 858, in runner await self.start(token, reconnect=reconnect) File "/home/Maden4ik/.local/lib/python3.10/site-packages/discord/client.py", line 786, in start await self.login(token) File "/home/Maden4ik/.local/lib/python3.10/site-packages/discord/client.py", line 620, in login data = await self.http.static_login(token) File "/home/Maden4ik/.local/lib/python3.10/site-packages/discord/http.py", line 816, in static_login data = await self.request(Route('GET', '/users/@me')) File "/home/Maden4ik/.local/lib/python3.10/site-packages/discord/http.py", line 638, in request async with self.__session.request(method, url, **kwargs) as response: File "/home/Maden4ik/.local/lib/python3.10/site-packages/aiohttp/client.py", line 1197, in __aenter__ self._resp = await self._coro File "/home/Maden4ik/.local/lib/python3.10/site-packages/aiohttp/client.py", line 581, in _request conn = await self._connector.connect( File "/home/Maden4ik/.local/lib/python3.10/site-packages/aiohttp/connector.py", line 544, in connect proto = await self._create_connection(req, traces, timeout) File "/home/Maden4ik/.local/lib/python3.10/site-packages/aiohttp/connector.py", line 944, in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) File "/home/Maden4ik/.local/lib/python3.10/site-packages/aiohttp/connector.py", line 1257, in _create_direct_connection raise last_exc File "/home/Maden4ik/.local/lib/python3.10/site-packages/aiohttp/connector.py", line 1226, in _create_direct_connection transp, proto = await self._wrap_create_connection( File "/home/Maden4ik/.local/lib/python3.10/site-packages/aiohttp/connector.py", line 1033, in _wrap_create_connection raise client_error(req.connection_key, exc) from exc aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host discord.com:443 ssl:default [Connect call failed ('162.159.135.232', 443)]
What should I do?

Attached Files

Thumbnail(s)
   
Reply
#2
Quote:
Error:
ConnectionRefusedError: [Errno 111] Connect call failed ('162.159.135.232', 443)

Your code tried to connect to a server at that address and the connection was refused. That doesn't seem to be an error in the code.
Calab likes this post
Reply
#3
(Jul-31-2024, 04:30 PM)bowlofred Wrote:
Quote:
Error:
ConnectionRefusedError: [Errno 111] Connect call failed ('162.159.135.232', 443)

Your code tried to connect to a server at that address and the connection was refused. That doesn't seem to be an error in the code.
What should I do?
Reply
#4
Maybe you have the wrong server configured. Maybe the server isn't working properly. Maybe you have to have network or app permissions on the server.

Most of these problems would be outside any code. It's not a python problem, its more likely a system administration or network administration problem.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Bug Error in the asyncio plugin Maden4ik 2 1,017 Jul-31-2024, 03:31 PM
Last Post: deanhystad
  ERROR: Cannot load plugin dbwest1 0 2,129 Sep-15-2020, 04:28 PM
Last Post: dbwest1
  plugin:xxx.py hasfailed to load 1204eray 1 2,777 Jun-26-2019, 09:23 PM
Last Post: micseydel
  inkscape plugin write in python error costycnc 5 4,442 Jan-25-2019, 08:02 PM
Last Post: costycnc
  Error building trac hacks plugin lapjunior 1 3,364 Apr-06-2018, 08:49 PM
Last Post: nilamo
  UML plugin for Python in Eclipse user2103 1 6,646 Mar-16-2018, 11:14 PM
Last Post: DeaD_EyE

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020