Search code examples
python-2.7google-cloud-platformgoogle-app-engine-pythoncloud-storage

cloudstorage's copy2 method throwing No api proxy found for service "memcache"


I am NOT doing unit testing.

I am just running following 2 commands on my Windows10 machine with Python2.7 and I am getting the infamous assertion error:

No api proxy found for service "memcache"

This is the code:

import cloudstorage as cstorage
cstorage.copy2("/nosuchbucket/nosuchfile1","/nosuchbucket/nosuchfile2")

Any pointers on what could be wrong?

Environment:

  • Google Cloud SDK 202.0.0
  • app-engine-python 1.9.70
  • app-engine-python-extras 1.9.69
  • Python 2.7.14

Solution

  • That particular library is the AppEngine Google Cloud Storage client library, designed to be used by a GAE application code.

    Such code cannot be executed in a standalone manner as you attempted to do, it needs to be executed inside (and complemented by) the GAE sandbox environment (either the local development server or the real GAE infra when deployed).

    See also related import cloudstorage, ImportError: No module named google.appengine.api