2017-08-29 6 views
1

私はcronジョブでRscriptを実行しようとしています。 RGAパッケージを使用しています。私は、端末に取得 エラーは次のとおりです。BASHのエラー:oauth_listener()に対話環境が必要です

Access token will be stored in the './ga-token.rds' file.
Error: oauth_listener() needs an interactive environment.

Execution halted

私のコードは次のとおりです。あなたが
install.packagesは( "httpuv")httpuvをダウンロードしてインストールする必要があり

library(RGA) 

authorize(client.id = ".......", client.secret = ".......", cache = "./ga-token.rds") 

答えて

0

。その後

require( "httpuv")。
それが働いています:
rga_auth < - 認可(client.id = "XXXXXXX.apps.googleusercontent.com"、client.secret = "XXXXXXXXXX") アクセストークンは「.ga-token.rds'に保存されますファイル。 .g-token.rdsを.gitignoreに追加する ブラウザで認証を待っています... Esc/Ctrl + Cを押して終了します 認証が完了しました。

関連する問題