问题描述
昨天这段代码在本地和生产服务器上工作正常:
Yesterday this code was working fine both in local and production servers:
import cloudstorage
def filelist(Handler):
gs_bucket_name="/bucketname"
list=cloudstorage.listbucket(gs_bucket_name)
logging.warning(list)
self.write(list)
for e in list:
self.write(e)
self.write("<br>")
从昨天到今天,我升级了GAE Launcher并更改了计费选项(我正在使用免费试用,现在是付费帐户)(不确定它是否有任何要做的事情,但只是为了提供额外的信息)
From yesterday to today I've upgraded GAE Launcher and changed the billing options (I was using a free trial and now a paid account) (not sure if it has anything to do, but just to give extra information)
但是,今天的代码停止在本地工作(生产正常)
But today the code stopped working in local (works fine in production)
这是错误日志的开始
WARNING 2015-02-20 09:50:21,721 admin.py:106] <cloudstorage.cloudstorage_api._Bucket object at 0x10ac31e90>
ERROR 2015-02-20 09:50:21,729 api_server.py:221] Exception while handling service_name: "app_identity_service"
method: "GetAccessToken"
request: "\n7https://www.googleapis.com/auth/devstorage.full_control"
request_id: "WoMrXkOyfe"
这个警告显示了一个桶对象,但是当我尝试在列表中迭代时,我得到了身份服务上的异常。
The warning shows a bucket object, but as soon as I try to iterate in the list I get the exception on the identity service.
什么是hapening ?似乎我需要授权本地devserver gcs mockup,但我不知道如何。
What is hapening? Seems that I need to authorize local devserver gcs mockup, but I'm not sure how.
请记住,这只发生在devserver中,而不是在生产中。
Remember this is only happening in devserver, not in production.
感谢您的帮助
Thanks for your help
推荐答案
根据下面的答案,1.9.18已经修复了这个问题。如果您仍然想要安装1.9.17版本,请点击以下链接:
As per the answer below, the 1.9.18 has been patched with a fix for this. If you still want to install the 1.9.17 version, please follow this link: https://storage.googleapis.com/appengine-sdks/deprecated/1917/GoogleAppEngineLauncher-1.9.17.dmg
这篇关于在GAE本地devserver中使用GCS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!