尝试Apache Beams示例代码时出现Oauth2client错误

时间:2017-10-20 13:23:34

标签: apache oauth-2.0 google-oauth2

我正在尝试运行Apache Beam Python示例(例如https://github.com/apache/beam/blob/master/sdks/python/apache_beam/examples/complete/game/user_score.py)。当我运行脚本时,我得到了

(py27) XXX-MBP:my_path$ python user_score.py --output /my_path/user_score_output
No handlers could be found for logger "oauth2client.contrib.multistore_file"
INFO:root:Missing pipeline option (runner). Executing pipeline using the default runner: DirectRunner.
/my_path_2/miniconda3/envs/py27/lib/python2.7/site-packages/apache_beam/io/gcp/gcsio.py:121: DeprecationWarning: object() takes no parameters
  super(GcsIO, cls).__new__(cls, storage_client))
INFO:root:Starting the size estimation of the input
INFO:oauth2client.transport:Attempting refresh to obtain initial access_token
INFO:oauth2client.client:Refreshing access_token
INFO:root:Finished the size estimation of the input at 1 files. Estimation took 0.453105211258 seconds
/my_path_2/miniconda3/envs/py27/lib/python2.7/site-packages/apache_beam/coders/typecoders.py:135: UserWarning: Using fallback coder for typehint: Any.
  warnings.warn('Using fallback coder for typehint: %r.' % typehint)
/my_path_2/miniconda3/envs/py27/lib/python2.7/site-packages/apache_beam/coders/typecoders.py:135: UserWarning: Using fallback coder for typehint: <type 'NoneType'>.
  warnings.warn('Using fallback coder for typehint: %r.' % typehint)
INFO:root:Running pipeline with DirectRunner.
INFO:root:Starting the size estimation of the input
INFO:oauth2client.transport:Attempting refresh to obtain initial access_token
INFO:oauth2client.client:Refreshing access_token
INFO:root:Finished the size estimation of the input at 2 files. Estimation took 0.477814912796 seconds
INFO:oauth2client.transport:Attempting refresh to obtain initial access_token
INFO:oauth2client.client:Refreshing access_token

问题似乎与Oauth2client和获取访问令牌有关。我google了一下,人们正在谈论设置同意='提示',但它是在要求用户同意的领域。这里我只是下载一个数据集。是否可以访问我的Google Cloud服务?其他程序可以将程序写入Google云端存储。我在看https://developers.google.com/identity/protocols/OAuth2,但我真的不明白我应该做什么......

0 个答案:

没有答案