运行数据存储区Wordcount示例时无法添加额外的范围

时间:2015-04-27 22:31:07

标签: google-cloud-platform google-cloud-datastore google-cloud-dataflow

我正在尝试从Dataflow SDK运行DatastoreWordCountExample

说明表明我应该运行以下命令:

$ export CLOUDSDK_EXTRA_SCOPES = https://www.googleapis.com/auth/datastore $ gcloud auth login

然而,当我这样做时,我收到以下错误:

$ export CLOUDSDK_EXTRA_SCOPES=https://www.googleapis.com/auth/datastore
$ gcloud auth login
Traceback (most recent call last):
  File "/Users/brian/opt/google-cloud-sdk/./lib/googlecloudsdk/gcloud/gcloud.py", line 91, in <module>
    from googlecloudsdk.calliope import base
  File "/Users/brian/opt/google-cloud-sdk/./lib/googlecloudsdk/calliope/base.py", line 8, in <module>
    from googlecloudsdk.calliope import usage_text
  File "/Users/brian/opt/google-cloud-sdk/./lib/googlecloudsdk/calliope/usage_text.py", line 12, in <module>
    from googlecloudsdk.calliope import arg_parsers
  File "/Users/brian/opt/google-cloud-sdk/./lib/googlecloudsdk/calliope/arg_parsers.py", line 42, in <module>
    from googlecloudsdk.core import log
  File "/Users/brian/opt/google-cloud-sdk/./lib/googlecloudsdk/core/log.py", line 12, in <module>
    from googlecloudsdk.core import properties
  File "/Users/brian/opt/google-cloud-sdk/./lib/googlecloudsdk/core/properties.py", line 10, in <module>
    from googlecloudsdk.core import config
  File "/Users/brian/opt/google-cloud-sdk/./lib/googlecloudsdk/core/config.py", line 293, in <module>
    _CheckForExtraScopes()
  File "/Users/brian/opt/google-cloud-sdk/./lib/googlecloudsdk/core/config.py", line 291, in _CheckForExtraScopes
    CLOUDSDK_SCOPES.extend(extra_scopes.split())
AttributeError: 'tuple' object has no attribute 'extend'

请注意,只要在环境变量中未设置CLOUDSDK_EXTRA_SCOPES,gcloud就会运行。

1 个答案:

答案 0 :(得分:1)

根据https://code.google.com/p/google-cloud-sdk/issues/detail?id=128,您似乎不再需要为数据存储设置此变量。你可以试试看,告诉我们它是否有用吗?

(同时我会更新文档)