python – Google Dataflow上Apache Beam示例的权限错误

python – Google Dataflow上Apache Beam示例的权限错误,第1张

概述我无法将Apache Beam示例从本地计算机提交到我们的云平台. 使用gcloud auth list我可以看到正确的帐户当前是活动的.我可以使用gsutil和Web客户端与文件系统进行交互.我可以使用cloud shell通过python REPL运行管道. 但是当我尝试运行python wordcount示例时,我收到以下错误: IOError: Could not upload to GC 我无法将Apache Beam示例从本地计算机提交到我们的云平台.

使用gcloud auth List我可以看到正确的帐户当前是活动的.我可以使用gsutil和Web客户端与文件系统进行交互.我可以使用cloud shell通过python REPL运行管道.

但是当我尝试运行python wordcount示例时,我收到以下错误:

IOError: Could not upload to GCS path gs://my_bucket/tmp: access denIEd.Please verify that credentials are valID and that you have write access to the specifIEd path.

关于凭证,我有什么遗漏吗?

解决方法 在整个上午度过这个问题之后,这是我的两分钱.

您应该确保在本地计算机上使用gcloud登录,但是,请注意从gcloud auth login返回的警告消息:

警告:`gcloud auth login`不再写入应用程序默认凭据.

python代码需要这些凭据才能正确识别您的凭据.

解决方案很简单,只需使用:
gcloud auth application-default login

这将写入一个凭证文件:〜/ .config / gcloud / application_default_credentials.Json,用于本地开发环境中的身份验证.

总结

以上是内存溢出为你收集整理的python – Google Dataflow上Apache Beam示例的权限错误全部内容,希望文章能够帮你解决python – Google Dataflow上Apache Beam示例的权限错误所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/langs/1193936.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-03
下一篇 2022-06-03

发表评论

登录后才能评论

评论列表(0条)

保存