4

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.4,,Python 2.7.3

4

1 回答 1

0

你需要编辑app.yaml

你应该有:

runtime: python

用。。。来代替:

runtime: python27
threadsafe: true

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

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

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

于 2013-03-22T15:01:14.287 回答