无法在Google应用引擎启动器中运行hello world

时间:2013-01-15 07:09:58

标签: google-app-engine python-2.7

Google App Engine Launcher在运行任何应用时突然无法正常工作,昨天运行良好。

错误产生:

     wi2013-01-15 14:56:52 Running command: "['C:\\Python27\\pythonw.exe', 'C:\\Program Files (x86)\\Google\\google_appengine\\dev_appserver.py', '--admin_console_server=', '--port=8080', 'C:\\Users\\Lawrence\\Documents\\guestbook-2']"
Traceback (most recent call last):
  File "C:\Program Files (x86)\Google\google_appengine\dev_appserver.py", line 171, in <module>
    run_file(__file__, globals())
  File "C:\Program Files (x86)\Google\google_appengine\dev_appserver.py", line 167, in run_file
    execfile(script_path, globals_)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver_main.py", line 166, in <module>
    from google.appengine.tools import appcfg
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 41, in <module>
    import mimetypes
  File "C:\Python27\Lib\mimetypes.py", line 29, in <module>
    import urllib
  File "C:\Python27\Lib\urllib.py", line 26, in <module>
    import socket
  File "C:\Python27\Lib\socket.py", line 47, in <module>
    import _socket
ImportError: Module use of python25.dll conflict with this version of Python.
2013-01-15 14:56:52 (Process exited with code 1)

当你谷歌这个错误,很多解决方案告诉你改变 System/ User Environment要添加C:\Python27;C:\Python27\Scripts; C:\Python27\Lib; C:\Python27\libs;等的变量,删除或添加用户变量等等。所有这些技巧对我都不起作用。

我没有安装python25。那些程序引用它并使用import _socket是谷歌应用程序引擎启动器本身或谷歌驱动器,我已经停止了我的谷歌驱动器,因为人们发现这可能会导致问题。所以我猜这个GAE在它内部发生一些错误时会发生冲突。线索是我在谷歌应用启动器日志中遇到了另一个错误,C:\Program Files (x86)\Google\google_appengine\launcher\GoogleAppEngineLauncher.exe.log 我正在使用win 7 64位,GAE 1.7.4Python 2.7.3

1 个答案:

答案 0 :(得分:0)

您需要修改app.yaml

你应该:

runtime: python

替换为:

runtime: python27
threadsafe: true

注意线程安全: https://developers.google.com/appengine/docs/python/python25/migrate27#threadsafe

app.yaml的其他设置 https://developers.google.com/appengine/docs/python/config/appconfig#Required_Elements

如果从Python 2.5开始,请阅读: https:// developers.google.com/appengine/docs/python/python25/migrate27#appyaml