Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
455 views
in Technique[技术] by (71.8m points)

python - Using GCS in GAE Local devserver

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>")

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)

This is the beginning of the error log

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: "
7https://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.

What is hapening? Seems that I need to authorize local devserver gcs mockup, but I'm not sure how.

Remember this is only happening in devserver, not in production.

Thanks for your help

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...