質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Python 3.x

Python 3はPythonプログラミング言語の最新バージョンであり、2008年12月3日にリリースされました。

Python

Pythonは、コードの読みやすさが特徴的なプログラミング言語の1つです。 強い型付け、動的型付けに対応しており、後方互換性がないバージョン2系とバージョン3系が使用されています。 商用製品の開発にも無料で使用でき、OSだけでなく仮想環境にも対応。Unicodeによる文字列操作をサポートしているため、日本語処理も標準で可能です。

Q&A

解決済

1回答

1516閲覧

Pythonでおそらく本体の方のエラーが起きる

ks_macaron

総合スコア2

Python 3.x

Python 3はPythonプログラミング言語の最新バージョンであり、2008年12月3日にリリースされました。

Python

Pythonは、コードの読みやすさが特徴的なプログラミング言語の1つです。 強い型付け、動的型付けに対応しており、後方互換性がないバージョン2系とバージョン3系が使用されています。 商用製品の開発にも無料で使用でき、OSだけでなく仮想環境にも対応。Unicodeによる文字列操作をサポートしているため、日本語処理も標準で可能です。

0グッド

0クリップ

投稿2022/04/11 08:23

Discord.pyを起動させようとするとこのようなエラーが出てきます。
おそらく、Python本体の方のエラーかと思われます。
何か対処法はありませんか?
Pythonのバージョンは3.9です。
何度もPythonの再インストールをしてます。
(Python関連のファイルをすべて削除してからPythonの再インストールしています)
OS : macOS10.15.7

python

1Traceback (most recent call last): 2 File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/aiohttp/connector.py", line 969, in _wrap_create_connection 3 return await self._loop.create_connection(*args, **kwargs) # type: ignore # noqa 4 File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/base_events.py", line 1090, in create_connection 5 transport, protocol = await self._create_connection_transport( 6 File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/base_events.py", line 1120, in _create_connection_transport 7 await waiter 8 File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/sslproto.py", line 534, in data_received 9 ssldata, appdata = self._sslpipe.feed_ssldata(data) 10 File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/sslproto.py", line 188, in feed_ssldata 11 self._sslobj.do_handshake() 12 File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ssl.py", line 944, in do_handshake 13 self._sslobj.do_handshake() 14ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129) 15 16The above exception was the direct cause of the following exception: 17 18Traceback (most recent call last): 19 File "/Users/a/Desktop/KinKinBot.py", line 21, in <module> 20 client.run("トークンが出てるので隠します") 21 File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/discord/client.py", line 723, in run 22 return future.result() 23 File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/discord/client.py", line 702, in runner 24 await self.start(*args, **kwargs) 25 File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/discord/client.py", line 665, in start 26 await self.login(*args, bot=bot) 27 File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/discord/client.py", line 511, in login 28 await self.http.static_login(token.strip(), bot=bot) 29 File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/discord/http.py", line 300, in static_login 30 data = await self.request(Route('GET', '/users/@me')) 31 File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/discord/http.py", line 192, in request 32 async with self.__session.request(method, url, **kwargs) as r: 33 File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/aiohttp/client.py", line 1117, in __aenter__ 34 self._resp = await self._coro 35 File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/aiohttp/client.py", line 520, in _request 36 conn = await self._connector.connect( 37 File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/aiohttp/connector.py", line 535, in connect 38 proto = await self._create_connection(req, traces, timeout) 39 File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/aiohttp/connector.py", line 892, in _create_connection 40 _, proto = await self._create_direct_connection(req, traces, timeout) 41 File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/aiohttp/connector.py", line 1051, in _create_direct_connection 42 raise last_exc 43 File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/aiohttp/connector.py", line 1020, in _create_direct_connection 44 transp, proto = await self._wrap_create_connection( 45 File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/aiohttp/connector.py", line 971, in _wrap_create_connection 46 raise ClientConnectorCertificateError(req.connection_key, exc) from exc 47aiohttp.client_exceptions.ClientConnectorCertificateError: Cannot connect to host discord.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)')]

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

ベストアンサー

Pythonではなく、プラットフォーム側のSSL証明書の期限切れのようです。

プラットフォーム毎に対処方法は異なります。
バージョンによっても違うかもしれないので、
過去の同様の質問から関連情報を追ってみてください。
追記: Pythonのインストール自体はこの場合問題ありません。

https://teratail.com/questions/267889

投稿2022/04/11 15:37

編集2022/04/11 15:39
teamikl

総合スコア8664

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

ks_macaron

2022/04/12 10:22

Traceback (most recent call last): File "/Users/a/Desktop/KinKinBot.py", line 21, in <module> client.run("トークン") File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/discord/client.py", line 723, in run return future.result() File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/discord/client.py", line 702, in runner await self.start(*args, **kwargs) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/discord/client.py", line 666, in start await self.connect(reconnect=reconnect) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/discord/client.py", line 601, in connect raise PrivilegedIntentsRequired(exc.shard_id) from None discord.errors.PrivilegedIntentsRequired: Shard ID None is requesting privileged intents that have not been explicitly enabled in the developer portal. It is recommended to go to https://discord.com/developers/applications/ and explicitly enable the privileged intents within your application's page. If this is not possible, then consider disabling the privileged intents instead. となります。
ks_macaron

2022/04/12 10:24

DiscordBOTのほうの設定変えたらできました! ありがとうございました!
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問