前提・実現したいこと
ubuntuでdiscordbotを動かそうとしたところ以下のエラーが出ました
発生している問題・エラーメッセージ
Traceback (most recent call last): File "/home/sibainu/.local/lib/python3.9/site-packages/aiohttp/connector.py", line 999, in _create_direct_connection hosts = await asyncio.shield(host_resolved) File "/home/sibainu/.local/lib/python3.9/site-packages/aiohttp/connector.py", line 865, in _resolve_host addrs = await self._resolver.resolve(host, port, family=self._family) File "/home/sibainu/.local/lib/python3.9/site-packages/aiohttp/resolver.py", line 31, in resolve infos = await self._loop.getaddrinfo( File "/usr/lib/python3.9/asyncio/base_events.py", line 856, in getaddrinfo return await self.run_in_executor( File "/usr/lib/python3.9/concurrent/futures/thread.py", line 52, in run result = self.fn(*self.args, **self.kwargs) File "/usr/lib/python3.9/socket.py", line 953, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno -5] No address associated with hostname The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/sibainu/discord/discordongaku-main/しばさぽーと.py", line 71, in <module> bot.run("ODc3OTI0MjQyMDczNzM1MjU4.YR5sqg.OVWyt1QVrn0UmJkQXjrB4vH76Wk") File "/home/sibainu/.local/lib/python3.9/site-packages/discord/client.py", line 723, in run return future.result() File "/home/sibainu/.local/lib/python3.9/site-packages/discord/client.py", line 702, in runner await self.start(*args, **kwargs) File "/home/sibainu/.local/lib/python3.9/site-packages/discord/client.py", line 665, in start await self.login(*args, bot=bot) File "/home/sibainu/.local/lib/python3.9/site-packages/discord/client.py", line 511, in login await self.http.static_login(token.strip(), bot=bot) File "/home/sibainu/.local/lib/python3.9/site-packages/discord/http.py", line 300, in static_login data = await self.request(Route('GET', '/users/@me')) File "/home/sibainu/.local/lib/python3.9/site-packages/discord/http.py", line 192, in request async with self.__session.request(method, url, **kwargs) as r: File "/home/sibainu/.local/lib/python3.9/site-packages/aiohttp/client.py", line 1117, in __aenter__ self._resp = await self._coro File "/home/sibainu/.local/lib/python3.9/site-packages/aiohttp/client.py", line 520, in _request conn = await self._connector.connect( File "/home/sibainu/.local/lib/python3.9/site-packages/aiohttp/connector.py", line 535, in connect proto = await self._create_connection(req, traces, timeout) File "/home/sibainu/.local/lib/python3.9/site-packages/aiohttp/connector.py", line 892, in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) File "/home/sibainu/.local/lib/python3.9/site-packages/aiohttp/connector.py", line 1011, in _create_direct_connection raise ClientConnectorError(req.connection_key, exc) from exc aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host discord.com:443 ssl:default [No address associated with hostname]
試したこと
おそらくssl:defaultから、sslがインストールされてないものだと思います。
ここのURLを参考にしたのですが、解説がよくわかりませんでした。
補足情報(FW/ツールのバージョンなど)
ubuntu20.04.1
python3.9
あなたの回答
tips
プレビュー