简体   繁体   中英

google assistant on pi3

So I'm new to the raspberry firm and I'm kinda stuck in the middle of something was planning to start up with google assistant everything is fine I made the required .json file but could not generate the link after entering the code line.

google-oauthlib-tool --scope https://www.googleapis.com/auth/assistant-sdk-prototype \
  --scope https://www.googleapis.com/auth/gcm \
  --save --headless --client-secrets /path/to/client_secret_client-id.json```


I get this

        google-oauthlib-tool --scope https://www.googleapis.com/auth/assistant-sdk-prototype \
    >       --scope https://www.googleapis.com/auth/gcm \
    >       --save --headless --client-secrets /path/to/client_secret_.json
    Traceback (most recent call last):
      File "/home/pi/env/bin/google-oauthlib-tool", line 10, in <module>
        sys.exit(main())
      File "/home/pi/env/lib/python3.7/site-packages/click/core.py", line 722, in __call__
        return self.main(*args, **kwargs)
      File "/home/pi/env/lib/python3.7/site-packages/click/core.py", line 697, in main
        rv = self.invoke(ctx)
      File "/home/pi/env/lib/python3.7/site-packages/click/core.py", line 895, in invoke
        return ctx.invoke(self.callback, **ctx.params)
      File "/home/pi/env/lib/python3.7/site-packages/click/core.py", line 535, in invoke
        return callback(*args, **kwargs)
      File "/home/pi/env/lib/python3.7/site-packages/google_auth_oauthlib/tool/__main__.py", line 100, in main
        scopes=scope
      File "/home/pi/env/lib/python3.7/site-packages/google_auth_oauthlib/flow.py", line 196, in from_client_secrets_file
        with open(client_secrets_file, 'r') as json_file:
    FileNotFoundError: [Errno 2] No such file or directory: '/path/to/client_secret.json

在此处输入图片说明

in Flow.py, the directory file you are passing in does not exist, it is still trying to call path/to/client_secret.json. This line was copy and pasted from somewhere else so you need to update the client_secrets_file variable with the real path to the json file.

If you provided more code I could help further.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM