tweepyでTwitterAPIで認証のするさい、以下のエラーが出て困りました。
InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings InsecureRequestWarning)
ひとまず、以下のようにスクリプトの手前で以下のコマンドで環境変数を設定して回避するようにしました。
export PYTHONWARNINGS="ignore:Unverified HTTPS request"
なにか良い方法はないものか…。
以前の以下の記事のように、証明書を無視できればいいんですが。

Pythonでrequests実行すると「OSError: Could not find a suitable TLS CA certificate bundle, invalid path:」
久々にrequestsを使ったAPI実行するスクリプトを作成して実行したところ、以下のエラー。 r = requests.get(API_URL, params=params) ↓ OSError: Could not find a sui...
コメント