Genshin-Discord-Bot
Genshin-Discord-Bot copied to clipboard
运行报错,请问如何解决
报错内容如下
2022-08-03 17:34:23 WARNING PyNaCl is not installed, voice will NOT be supported
2022-08-03 17:34:23 INFO discord.client logging in using static token
2022-08-03 17:34:23 INFO logging in using static token
Traceback (most recent call last):
File "/opt/python39/lib/python3.9/site-packages/aiohttp/connector.py", line 986, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs) # type: ignore[return-value] # noqa
File "/opt/python39/lib/python3.9/asyncio/base_events.py", line 1056, in create_connection
raise exceptions[0]
File "/opt/python39/lib/python3.9/asyncio/base_events.py", line 1041, in create_connection
sock = await self._connect_sock(
File "/opt/python39/lib/python3.9/asyncio/base_events.py", line 955, in _connect_sock
await self.sock_connect(sock, address)
File "/opt/python39/lib/python3.9/asyncio/selector_events.py", line 502, in sock_connect
return await fut
File "/opt/python39/lib/python3.9/asyncio/selector_events.py", line 537, in _sock_connect_cb
raise OSError(err, f'Connect call failed {address}')
OSError: [Errno 113] Connect call failed ('2001::1f0d:4fe9', 443, 0, 0)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/root/Genshin-Discord-Bot/./main.py", line 44, in <module>
client.run(config.bot_token)
File "/opt/python39/lib/python3.9/site-packages/discord/client.py", line 882, in run
asyncio.run(runner())
File "/opt/python39/lib/python3.9/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/opt/python39/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
File "/opt/python39/lib/python3.9/site-packages/discord/client.py", line 857, in runner
await self.start(token, reconnect=reconnect)
File "/opt/python39/lib/python3.9/site-packages/discord/client.py", line 790, in start
await self.login(token)
File "/opt/python39/lib/python3.9/site-packages/discord/client.py", line 633, in login
data = await self.http.static_login(token.strip())
File "/opt/python39/lib/python3.9/site-packages/discord/http.py", line 772, in static_login
data = await self.request(Route('GET', '/users/@me'))
File "/opt/python39/lib/python3.9/site-packages/discord/http.py", line 595, in request
async with self.__session.request(method, url, **kwargs) as response:
File "/opt/python39/lib/python3.9/site-packages/aiohttp/client.py", line 1138, in __aenter__
self._resp = await self._coro
File "/opt/python39/lib/python3.9/site-packages/aiohttp/client.py", line 535, in _request
conn = await self._connector.connect(
File "/opt/python39/lib/python3.9/site-packages/aiohttp/connector.py", line 542, in connect
proto = await self._create_connection(req, traces, timeout)
File "/opt/python39/lib/python3.9/site-packages/aiohttp/connector.py", line 907, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
File "/opt/python39/lib/python3.9/site-packages/aiohttp/connector.py", line 1206, in _create_direct_connection
raise last_exc
File "/opt/python39/lib/python3.9/site-packages/aiohttp/connector.py", line 1175, in _create_direct_connection
transp, proto = await self._wrap_create_connection(
File "/opt/python39/lib/python3.9/site-packages/aiohttp/connector.py", line 992, 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 ('2001::1f0d:4fe9', 443, 0, 0)]
你的電腦連接到互聯網了嗎?
你的電腦連接到互聯網了嗎?
连接了的
做 pip3 install certifi
你能指定你的 OS?
做
pip3 install certifi
你能指定你的 OS?
我是在centos7上运行的,我是个java开发,对python不是很熟悉请问 pip3 install certifi
指定OS应该怎么写
做 pip3 install certifi
你需要更新你的 ssl
我更新了pip3的版本后执行 pip3 install certifi
又报了这个警告,这个有办法跳过吗?
Looking in indexes: http://mirrors.tencentyun.com/pypi/simple
Requirement already satisfied: certifi in /opt/python39/lib/python3.9/site-packages (2022.6.15)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
嘗試更新您的 ssl ,我不知道如何在 centos 上執行
嘗試更新您的 ssl ,我不知道如何在 centos 上執行
更新了视乎也不管用,话说这个能用docker部署?
是的,嘗試使用 docker 部署
是的,嘗試使用 docker 部署
有无教程?
是的,嘗試使用 docker 部署
最新的2.0版本好像还没有docker的部署方式吧