GAE问题,哪位大虾给看看,python2.7.8,GAE1.9.50,自带的demo可以顺利运行

app.yaml文件
application: mygaetest
version: 1
runtime: python27
api_version: 1
threadsafe: true

handlers:

  • url: /.* script: hello_world.py

hello_world文件:
print('Content-type:text/plain\n')
print('Hello from Head First Python on GAE')

trackback:
Traceback (most recent call last):
File "F:\Google\google_appengine\dev_appserver.py", line 101, in
run_file(_file__, globals())
File "F:\Google\google_appengine\dev_appserver.py", line 97, in run_file
execfile(_PATHS.script_file(script_name), globals
)
File "F:\Google\google_appengine\google\appengine\tools\devappserver2\devappserver2.py", line 1041, in
main()
File "F:\Google\google_appengine\google\appengine\tools\devappserver2\devappserver2.py", line 1029, in main
dev_server.start(options)
File "F:\Google\google_appengine\google\appengine\tools\devappserver2\devappserver2.py", line 754, in start
env_variables=parsed_env_variables)
File "F:\Google\google_appengine\google\appengine\tools\devappserver2\application_configuration.py", line 851, in init
env_variables)
File "F:\Google\google_appengine\google\appengine\tools\devappserver2\application_configuration.py", line 131, in init
self._config_path)
File "F:\Google\google_appengine\google\appengine\tools\devappserver2\application_configuration.py", line 441, in _parse_configuration
config, files = appinfo_includes.ParseAndReturnIncludePaths(f)
File "F:\Google\google_appengine\google\appengine\api\appinfo_includes.py", line 82, in ParseAndReturnIncludePaths
appyaml = appinfo.LoadSingleAppInfo(appinfo_file)
File "F:\Google\google_appengine\google\appengine\api\appinfo.py", line 2369, in LoadSingleAppInfo
listener.Parse(app_info)
File "F:\Google\google_appengine\google\appengine\api\yaml_listener.py", line 227, in Parse
self._HandleEvents(self._GenerateEventParameters(stream, loader_class))
File "F:\Google\google_appengine\google\appengine\api\yaml_listener.py", line 178, in _HandleEvents
raise yaml_errors.EventError(e, event_object)
google.appengine.api.yaml_errors.EventError: threadsafe cannot be enabled with CGI handler: hello_world.py
in "C:\Users\T\Documents\python_excecise\chapter10(py2.7.8)\mygaetest\app.yaml", line 9, column 25
2017-11-24 17:42:48 (Process exited with code 1)

2个回答

图片说明找到答案啊!!

GAE的版本不一样,1.9.50的版本yaml配置文件的写法不一样

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!