我試着使用Python 3.2和Python 2.7運行谷歌App Engine開發服務器,得到了兩個錯誤:如何在Windows上運行Google App Engine Web服務器是否正確?
的Python 2.7:
D:\nCdy\WA>C:\Python27\python.exe "D:\Program Files\Google\google_appengine\dev_
appserver.py" wa.py
Traceback (most recent call last):
File "D:\Program Files\Google\google_appengine\dev_appserver.py", line 76, in
<module>
run_file(__file__, globals())
File "D:\Program Files\Google\google_appengine\dev_appserver.py", line 72, in
run_file
execfile(script_path, globals_)
File "D:\Program Files\Google\google_appengine\google\appengine\tools\dev_apps
erver_main.py", line 156, in <module>
from google.appengine.tools import dev_appserver
File "D:\Program Files\Google\google_appengine\google\appengine\tools\dev_apps
erver.py", line 179, in <module>
mimetypes.add_type(mime_type, '.' + ext)
File "C:\Python27\lib\mimetypes.py", line 344, in add_type
init()
File "C:\Python27\lib\mimetypes.py", line 355, in init
db.read_windows_registry()
File "C:\Python27\lib\mimetypes.py", line 259, in read_windows_registry
for ctype in enum_types(mimedb):
File "C:\Python27\lib\mimetypes.py", line 249, in enum_types
ctype = ctype.encode(default_encoding) # omit in 3.x!
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 in position 0: ordinal
not in range(128)
的Python 3.2:
D:\nCdy\WA>C:\Python32\python.exe "D:\Program Files\Google\google_appengine\dev_
appserver.py" wa.py
Traceback (most recent call last):
File "D:\Program Files\Google\google_appengine\dev_appserver.py", line 76, in
<module>
run_file(__file__, globals())
File "D:\Program Files\Google\google_appengine\dev_appserver.py", line 72, in
run_file
execfile(script_path, globals_)
NameError: global name 'execfile' is not defined
我如何運行?
除了別的,你不」 t想要指定一個.py文件的路徑作爲dev_appserver的參數;相反,您要指定包含app.yaml的目錄的路徑。 – geoffspear
是的,這可能也是問題。也許,不確定。 – Cynede