2

Raspberry Pi から Google Assistant API へのアクセスを承認しようとすると、「SSLError」タイプのエラーが表示され、証明書の検証に失敗したことが示されます。

私が実行すると:

python -m googlesamples.assistant.auth_helpers --client-secrets <path-to-secrets-file>

次のトレースを取得します。

Traceback (most recent call last):
  File "/usr/lib/python3.4/runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.4/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/pi/env/lib/python3.4/site-packages/googlesamples/assistant/auth_helpers/__main__.py", line 54, in <module>
    main()
  File "/home/pi/env/lib/python3.4/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/pi/env/lib/python3.4/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/pi/env/lib/python3.4/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/pi/env/lib/python3.4/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/pi/env/lib/python3.4/site-packages/googlesamples/assistant/auth_helpers/__main__.py", line 48, in main
    creds = credentials_flow_interactive(client_secrets, scope)
  File "/home/pi/env/lib/python3.4/site-packages/googlesamples/assistant/auth_helpers/__init__.py", line 47, in credentials_flow_interactive
    flow.run_console()
  File "/home/pi/env/lib/python3.4/site-packages/google_auth_oauthlib/flow.py", line 358, in run_console
    self.fetch_token(code=code)
  File "/home/pi/env/lib/python3.4/site-packages/google_auth_oauthlib/flow.py", line 235, in fetch_token
    **kwargs)
  File "/home/pi/env/lib/python3.4/site-packages/requests_oauthlib/oauth2_session.py", line 221, in fetch_token
    verify=verify, proxies=proxies)
  File "/home/pi/env/lib/python3.4/site-packages/requests/sessions.py", line 535, in post
    return self.request('POST', url, data=data, json=json, **kwargs)
  File "/home/pi/env/lib/python3.4/site-packages/requests_oauthlib/oauth2_session.py", line 360, in request
    headers=headers, data=data, **kwargs)
  File "/home/pi/env/lib/python3.4/site-packages/requests/sessions.py", line 488, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/pi/env/lib/python3.4/site-packages/requests/sessions.py", line 609, in send
    r = adapter.send(request, **kwargs)
  File "/home/pi/env/lib/python3.4/site-packages/requests/adapters.py", line 497, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:600)

どうすればこれを修正できますか?

4

1 に答える 1