尝试在GoogleAppEngine上执行HelloWorld,但收到以下错误。
C:\LearningGoogleAppEngine\HelloWorld>dev_appserver.py helloworld
WARNING 2012-07-17 10:21:37,250 rdbms_mysqldb.py:74] The rdbms API is not available 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 133, in
run_file(file, globals())
File "C:\Program Files (x86)\Google\google_appengine\dev_appserver.py", line 129, in run_file
execfile(script_path, globals_)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver_main.py", line 694, in sys.exit(main(sys.argv))
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver_main.py", line 582, in main root_path, {}, default_partition=default_partition)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 3217, in LoadAppConfig raise AppConfigNotFoundError
google.appengine.tools.dev_appserver.AppConfigNotFoundError
我在GoogleCode,StackO上发现了有关此问题的帖子。但无论我尝试什么,我仍然无法克服这个错误
在Windows 7机器上安装的Python版本是:2.7.3
GAE启动器启动画面显示以下内容:
发布1.7.0
Api版本:['1']
Python:2.5.2
wxPython:2.8.8.1(msw-unicode)
有人可以帮忙吗?
答案 0 :(得分:1)
已经有一段时间了,但我相信我之前通过将import rdbms
添加到dev_appserver.py
嗯..还是import MySQLdb
? (更有可能)
答案 1 :(得分:0)
运行时需要设置为“Python27”而不仅仅是“Python”,并且线程安全需要设置为false,这是我的 app.yaml
application: helloworld
version: 1
runtime: python27
api_version: 1
threadsafe: false
handlers:
- url: /.*
script: helloworld.py
这是我的 helloworld.py
print 'Content-Type: text/plain'
print ''
print 'Hello, world!'