Possible Duplicate:
PyDev project for Google App Engine not finding webapp2連接到從Python的
我做了HelloWorld教程,不能從Python的連接谷歌的數據存儲;
這是app.yaml文件:
application: "ceemee11111"
version: 1
runtime: python27
api_version: 1
threadsafe: true
handlers:
- url: /.*
script: helloworld.app
builtins:
- remote_api: on
這是helloworld.py的開始:
import cgi
import datetime
import urllib
import webapp2
from google.appengine.ext import db
from google.appengine.api import users
class Greeting(db.Model):
"""Models an individual Guestbook entry with an author, content, and date."""
author = db.StringProperty()
content = db.StringProperty(multiline=True)
date = db.DateTimeProperty(auto_now_add=True)
在Python Shell我CHDIR到的HelloWorld 進口的HelloWorld
,並得到導入錯誤「No module named webapp2」
Th e應用程序在本地主機上運行,而且在ceemee11111.appspot.com中也沒有錯誤。 作爲測試我註釋掉「進口webapp2的」,並再次嘗試,得到了一個錯誤 「無模塊命名google.appengine.ext」
請一些想法
丹
一個應用
我想如果應用程序在localhost和appspot.com上工作,模塊可用。 webapp2不在python的可用模塊中,所以我將嘗試安裝它。 –
我已經在python模塊中安裝了webapp2並再次運行import helloworld並獲得「導入錯誤:沒有名爲webob的模塊」 –
這對於基本過程來說似乎非常複雜。我所需要的是將put()和fetch()訪問權限存取到Google數據存儲區以獲取和檢索數據。有沒有更簡單的方法來做到這一點。 –