小编Jes*_* RJ的帖子

错误:使用google drive api的restricted_client

我正在尝试使用python将文件上传到谷歌驱动器.我从这里显示的快速入门开始:https: //developers.google.com/drive/api/v3/quickstart/python 我创建了oAuth 2客户端ID并将凭据json文件下载到我的项目文件夹中.但是,当我尝试运行代码时,它打开浏览器以确认我收到以下错误:

Error: restricted_client

Unregistered scope(s) in the request: https://www.googleapis.com/auth/drive
Request Details

That’s all we know.
Run Code Online (Sandbox Code Playgroud)

我试过改变范围

SCOPES = 'https://www.googleapis.com/auth/drive.metadata.readonly'
Run Code Online (Sandbox Code Playgroud)

SCOPES = 'https://www.googleapis.com/auth/drive'
Run Code Online (Sandbox Code Playgroud)

但是我得到了同样的错误,我也试过制作一个新的凭证和客户端ID,仍然得到相同的错误

任何人都可以指出我做错了什么?

google-drive-api

7
推荐指数
1
解决办法
572
查看次数

了解一些C++编码实践

我目前正在尝试理解以下代码(http://pastebin.com/zTHUrmyx)如何工作,我的方法是在调试中编译软件并使用gdb逐步执行代码.

但是,我遇到的问题是"步骤"并不总是告诉我发生了什么.特别不清楚的是EXECUTE {...}我无法介入的内容.

我该如何学习代码的作用?

   1     /*
   2     Copyright 2008 Brain Research Institute, Melbourne, Australia
   3
   4     Written by J-Donald Tournier, 27/06/08.
   5
   6     This file is part of MRtrix.
   7
   8     MRtrix is free software: you can redistribute it and/or modify
   9     it under the terms of the GNU General Public License as published by
  10     the Free Software Foundation, either version 3 of the License, or
  11     (at your option) any later version.
  12
  13 …
Run Code Online (Sandbox Code Playgroud)

c++ debugging gdb

6
推荐指数
1
解决办法
395
查看次数

标签 统计

c++ ×1

debugging ×1

gdb ×1

google-drive-api ×1