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数据存储区以获取和检索数据。有没有更简单的方法来做到这一点。 –