我关注的谷歌应用程序引擎的“Hello world”的教程在此链接: https://developers.google.com/appengine/docs/python/gettingstartedpython27/helloworld谷歌应用程序引擎的Python 2.7教程错误
我想我的加载应用helloworld.py:
import webapp2
class MainPage(webapp2.RequestHandler):
def get(self):
self.response.headers['Content-Type'] = 'text/plain'
self.response.out.write('Hello, Udacity!')
app = webapp2.WSGIApplication([('/', MainPage)],
debug=True)
我设置YAML文件:
application: helloworld
version: 1
runtime: python27
api_version: 1
threadsafe: true
handlers:
- url: /.*
script: helloworld.app
我没有使用谷歌应用程序引擎启动,只想做在控制台或命令行的一切。
我想用dev_appserver.py --port=8888 helloworld
开始我的helloworld应用程序,但控制台抱怨AppConfigNotFoundError
。控制台输出
C:\Documents and Settings\XXX\Desktop\helloworld>dev_appserver.py --port=8888
helloworld
WARNING 2012-08-11 23:12:21,562 rdbms_mysqldb.py:74] The rdbms API is not avail
able because the MySQLdb library could not be loaded.
Traceback (most recent call last):
File "C:\Program Files (x86)\Google\google_appengine\dev_appserver.py", line 1
33, in <module>
run_file(__file__, globals())
File "C:\Program Files (x86)\Google\google_appengine\dev_appserver.py", line 1
29, in run_file
execfile(script_path, globals_)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\de
v_appserver_main.py", line 694, in <module>
sys.exit(main(sys.argv))
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\de
v_appserver_main.py", line 582, in main
root_path, {}, default_partition=default_partition)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\de
v_appserver.py", line 3217, in LoadAppConfig
raise AppConfigNotFoundError
google.appengine.tools.dev_appserver.AppConfigNotFoundError
这会是一个路径问题吗?我的helloworld.py
和app.yaml
位于我桌面上的文件夹中,而不在Google应用引擎目录中。
如何解决这个错误?任何建议表示赞赏!
注意:我正在使用Python 2.7 NOT 2.5。