Using GCS in GAE Local devserver

后端 未结 4 1895
无人共我
无人共我 2020-12-19 03:15

Yesterday this code was working fine both in local and production servers:

import cloudstorage

def filelist(Handler):
    gs_bucket_name=\"/bucketname\"
            


        
相关标签:
4条回答
  • 2020-12-19 03:27

    I do believe that the cause of the problem is a bug in the local dev server (GoogleAppEngineLauncher), recently released. I'm experiencing something similar in the PHP runtime: GloudStorage fails locally

    0 讨论(0)
  • 2020-12-19 03:35

    This is a problem with the latest release (1.9.18). For now, until it gets fixed, you can downgrade to 1.9.17 by downloading the installer from here and just running it: https://storage.googleapis.com/appengine-sdks/featured/GoogleAppEngineLauncher-1.9.17.dmg

    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

    0 讨论(0)
  • 2020-12-19 03:39

    Update: As of March 5th, 2105 this was fixed in the public release of 1.9.18, which may be a simpler way to get the fix.

    Note: while the fix was in Python, issue can surface in Java, PHP and Go also because they use the Python local dev server code.

    0 讨论(0)
  • 2020-12-19 03:41

    It's a known bug in the dev_appserver, where the SDK does not cope with the credentials already persisted in earlier versions. For me (on Ubuntu 15.10 with SDK 1.9.33) it helped to simply remove a file:

    rm ~/.config/gcloud/application_default_credentials.json
    

    as suggested in the bug issue filed by Jari Wiklund.

    0 讨论(0)
提交回复
热议问题