I'm trying to use client and buckets of gcloud on google app engine. First, I install gcloud.
pip install gcloud -t my_project_directory
Second,I start to import gcloud and use it. Here is my code:
from gcloud import storage
class printstr(webapp2.RequestHandler):
def get(self):
self.response.out.write("YA")
config = {}
config['webapp2_extras.sessions'] = {
'secret_key': 'my-super-secret-key',
}
app = webapp2.WSGIApplication([('/back/printstr', printstr),
], debug=True, config=config)
When I open the address(localhost:8080/back/printstr), I should see "YA" on the page. But I get HTTP ERROR 500. And I see the log:
from google.protobuf import timestamp_pb2
ImportError: No module named protobuf
I'm sure there is a protobuf(folder) at google(folder), and there is a timestamp_pb2.py at protobuf(folder). But, I have no idea why do I get this error? Any help on how should I use gcloud?
Thanks!