ssl.sslcertverificationerror:[ssl:centergy_verify_failed]证书验证失败:自签名证书(_SSL.C:1131)
代码,
....
SCOPES = ['https://www.googleapis.com/auth/spreadsheets',]
# The ID and range of a sample spreadsheet.
SAMPLE_SPREADSHEET_ID = <My SpreadSheet>
creds = Credentials.from_authorized_user_file('token.json', SCOPES)
service = build('sheets', 'v4', credentials=creds)
sheet = service.spreadsheets()
result = sheet.values().get(spreadsheetId=SAMPLE_SPREADSHEET_ID,range="A:E").execute()
values = result.get()
对于它给出的
File "C:\Users\Bamgm14\AppData\Local\Programs\Python\Python38\lib\ssl.py", line 1309, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1131)
我找不到问题或 Stackexchange 答案,所以我提出了问题 我不确定发生了什么事。我尝试了一切可能的方法,从尝试创建一个新令牌(这会产生同样的问题)到将我的 Oauth 令牌重置为无变化。请提供您力所能及的帮助
For the code
....
SCOPES = ['https://www.googleapis.com/auth/spreadsheets',]
# The ID and range of a sample spreadsheet.
SAMPLE_SPREADSHEET_ID = <My SpreadSheet>
creds = Credentials.from_authorized_user_file('token.json', SCOPES)
service = build('sheets', 'v4', credentials=creds)
sheet = service.spreadsheets()
result = sheet.values().get(spreadsheetId=SAMPLE_SPREADSHEET_ID,range="A:E").execute()
values = result.get()
It Gives
File "C:\Users\Bamgm14\AppData\Local\Programs\Python\Python38\lib\ssl.py", line 1309, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1131)
I could not find an issue or Stackexchange answer so I am making the question
I am not sure what happened. I tried everything possible from trying to make a new token (which gives the same problem) to resetting my Oauth Token to no change. Please give any help you can
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论