简体   繁体   English

本地Appengine停止工作

[英]Local Appengine stopped working

I tried to run one of my AppEnigne projects (python) today but it will no longer launch, this is the stack trace I'm getting. 我今天尝试运行我的AppEnigne项目(python),但是它将不再启动,这是我得到的堆栈跟踪。

 *** Running dev_appserver with the following flags:
    --admin_console_server= --port=8080 --clear_datastore
Python command: /usr/bin/python2.5
Traceback (most recent call last):
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/dev_appserver.py", line 77, in <module>
    run_file(__file__, globals())
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/dev_appserver.py", line 73, in run_file
    execfile(script_path, globals_)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_main.py", line 138, in <module>
    import logging
ImportError: No module named logging

I thought it could be a python 2.6 error but I adjusted my path to /usr/bin/python2.5 and its still not working. 我以为可能是python 2.6错误,但我将路径调整为/usr/bin/python2.5 ,但仍然无法正常工作。 I'm running OSX 10.6.8 and have the latest AppEngineLauncher 1.5.4 我正在运行OSX 10.6.8,并具有最新的AppEngineLauncher 1.5.4

The only thing I changed recently that might have affected this is when I updated my XCode to the latest version, v4.2 build 4C199 我最近更改的唯一可能会影响此的事情是当我将XCode更新到最新版本v4.2 build 4C199时

Has anyone else faced this issue recently? 最近有人遇到过这个问题吗?

EDIT I can't import logging from the terminal either, same message. 编辑我也无法从终端import logging ,同样的消息。 Here's Python's path. 这是Python的路径。

    Chriss-MacBook-Pro:bin chris$ /usr/bin/python2.5
    Python 2.5.4 (r254:67916, Aug  2 2010, 20:09:39) 
    [GCC 4.2.1 (Apple Inc. build 5646)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import sys
    >>> sys.path
    ['', '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python25.zip', 
'/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5',
 '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-darwin',
 '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac',
 '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac/lib-scriptpackages',
 '/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python',
 '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-tk',
 '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload',
 '/Library/Python/2.5/site-packages',
 '/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/PyObjC',
 '/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/wx-2.8-mac-unicode']
    >>> 

Thanks to Nick and Wobble I've figured it out. 感谢尼克和沃布尔,我已经弄清楚了。 I recently updated my XCode install to the 4.2 GM release and removed the beta versions. 我最近将XCode安装更新为4.2 GM版本,并删除了beta版本。 Along the way OSX forgot where gcc was installed and prevented it from compiling the python modules like logging . 在OSX的过程中,忘记了gcc的安装位置,并阻止了它像logging一样编译python模块。 This resulted in missing .pyo files inside /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python25/logging which prevents import logging from working. 这导致/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python25/logging中缺少.pyo文件,从而导致import logging无法正常工作。

Logging wasn't the only module that wasn't compiled, just the first one AppEngine tried to import. 日志记录不是唯一未编译的模块,只是第一个AppEngine尝试导入的模块。

Solution: uninstall and do a clean install of XCode. 解决方案:卸载并重新安装XCode。 Make sure gcc can be found on your PATH and everything should be fine. 确保可以在您的PATH上找到gcc,并且一切正常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM