首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >google驱动器凭据和google地球引擎在RStudio中出错

google驱动器凭据和google地球引擎在RStudio中出错
EN

Stack Overflow用户
提问于 2021-05-06 15:13:45
回答 1查看 454关注 0票数 0

我刚开始在R中编程,我正在尝试执行一个R代码,在这里我可以访问google驱动器和google引擎。然而,有两种情况正在发生:第一,在我的个人笔记本电脑上,我运行代码,它运行得很完美,甚至没有打开浏览器来请求访问权限。在第二种情况下,当我使用远程桌面连接并访问公司的计算机时,代码无法获得google凭据。

会是什么?它是与远程访问有关还是与包版本有关?以下数据如下:

在我的笔记本电脑里:

代码语言:javascript
复制
> ## Initialize GEE ----
> ee_Initialize(email = gee_email, drive = TRUE)
-- rgee 1.0.9 ------------------------------------------------------------ earthengine-api 0.1.248 --
 √ email: my.email@colaborator.company.br 
 √ Google Drive credentials:  FOUND
 √ Initializing Google Earth Engine:  DONE!
 √ Earth Engine user: users/rcode
-----------------------------------------------------------------------------------------------------

公司计算机中通过远程桌面连接的相同代码:

代码语言:javascript
复制
> ## Initialize GEE ----
> ee_Initialize(email = gee_email, drive = TRUE)
-- rgee 1.0.9 ------------------------------------------------------------------------------- earthengine-api 0.1.263 -- 
 √ email: my.email@colaborator.company.br 
 √ Google Drive credentials:Erro: Can't get Google credentials.
Are you running googledrive in a non-interactive session? Consider:
  * `drive_deauth()` to prevent the attempt to get credentials.
  * Call `drive_auth()` directly with all necessary specifics.
  * Read more in: https://gargle.r-lib.org/articles/non-interactive-auth.html

执行命令之后:

googledrive::drive_auth("my.email@colaborator.company.br")

选项(gargle_quiet= FALSE)

代码语言:javascript
复制
> trying `token_fetch()`
> trying `credentials_service_account()`
> Error caught by `token_fetch()`:
  Argument 'txt' must be a JSON string, URL or file.
> trying `credentials_app_default()`
> trying `credentials_gce()`
> trying `credentials_byo_oauth()`
> Error caught by `token_fetch()`:
  inherits(token, "Token2.0") is not TRUE
> trying `credentials_user_oauth2()`
> Gargle2.0 initialize
> attempt to access internal gargle data from: googledrive
> adding 'userinfo.email' scope
> loading token from the cache
> no matching token in the cache
> initiating new token
Waiting for authentication in browser...
Press Esc/Ctrl + C to abort
Authentication complete.
> Error caught by `token_fetch()`:
  Failed to connect to accounts.google.com port 443: Timed out
Erro: Can't get Google credentials.
Are you running googledrive in a non-interactive session? Consider:
  * `drive_deauth()` to prevent the attempt to get credentials.
  * Call `drive_auth()` directly with all necessary specifics.
  * Read more in: https://gargle.r-lib.org/articles/non-interactive-auth.html
EN

回答 1

Stack Overflow用户

发布于 2021-12-29 22:44:12

经过多次尝试,我修复了不打开浏览器、删除和重新安装Rcpp包的问题(ver )。(现在一切都很完美

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/67421031

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档