Question

I'm trying to code a program to check files in Google Cloud Storage using Python.

Now I'm read the google doc -> https://developers.google.com/api-client-library/python/start/installation.

At the last step - "App Engine", it asks user to do following:

->> cd myproject

->> unzip google-api-python-client-gae-1.1.zip

So what's the next steps? I'm still having problem to run the Google sample python code about GCS, which throw error:

Traceback (most recent call last):
  File "gcs_test.py", line 22, in <module>
    from google.appengine.ext import webapp
ImportError: No module named google.appengine.ext

I tried to add below code but still got same error:

from sys import path
path.append(r"C:\Py_dev\gcs_test\google-api-python-client-gae-1.2.zip")
path.append(r"C:\Py_dev\gcs_test\C:\Py_dev\gcs_test\apiclient")

Thanks for all kind help!

Was it helpful?

Solution

google.appengine is the library used by App Engine apps, not by the api client library, the library you are looking for is apiclient

If you wish to run a normal python script instead of an App Engine app, you should remove references to App Engine specific libraries.

If you are running an app engine app, make sure you are using dev_appserver.py or the actual app engine servers, not just running the script using python

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top