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

Cannot add extra scope when running Datastore Wordcount Example

我正在尝试从 Dataflow SDK 运行 DatastoreWordCountExample

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

$ 出口 CLOUDSDK_EXTRA_SCOPES=https://www.googleapis.com/auth/datastore $ gcloud 身份验证登录

但是,当我这样做时,我收到以下错误:

$ 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 运行s 就会找到。

根据 https://code.google.com/p/google-cloud-sdk/issues/detail?id=128,您似乎不再需要为数据存储设置此变量。你能试试吗,如果不行的话告诉我们?

(同时我会更新文档)