Aptana更新打破Django调试

时间:2012-07-02 19:03:57

标签: django aptana aptana3

我根据the instructions设置了我的Aptana Studio 3 / PyDev调试器,甚至达到了一切正常的程度,包括断点和自动重载。爱它。现在,从上周六的更新开始,调试器不再起作用了。 我注意到了

Aptana Studio 3/plugins/org.python.pydev.debug_x.x/pysrc

文件夹丢失了。我在

中找到了另一个pysrc文件夹
Aptana Studio 3/plugins/org.python.pydev_x.x

似乎包含所需的pydevd模块,以及patch_django_autoreload()函数和所有模块。但是如果我把它放在Python路径上,我只会得到一个丑陋的堆栈跟踪,以

结尾
OSError: [Errno 2] No such file or directory

任何想法在这里出了什么问题?在OS X 10.7.4上使用Aptana Studio 3.2.0.201206251729,Django 1.3.1,Python 2.7.1。

编辑完整的追溯:

Executing process on new console: /usr/bin/python /Users/timo/Documents/aptana-studio-3-workspace/ssm/ssd/manage.py runserver 0.0.0.0:8000
Warning: to actually kill the created console, the parent process (in Eclipse console) must be killed first.
Traceback (most recent call last):
  File "/Users/timo/Documents/aptana-studio-3-workspace/ssm/ssd/manage.py", line 22, in <module>
    execute_manager(settings)
  File "/Library/Python/2.7/site-packages/django/core/management/__init__.py", line 438, in execute_manager
    utility.execute()
  File "/Library/Python/2.7/site-packages/django/core/management/__init__.py", line 379, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/Library/Python/2.7/site-packages/django/core/management/base.py", line 191, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/Library/Python/2.7/site-packages/django/core/management/base.py", line 220, in execute
    output = self.handle(*args, **options)
  File "/Library/Python/2.7/site-packages/django/core/management/commands/runserver.py", line 67, in handle
    self.run(*args, **options)
  File "/Library/Python/2.7/site-packages/django/core/management/commands/runserver.py", line 76, in run
    autoreload.main(self.inner_run, args, options)
  File "/Applications/Aptana Studio 3/plugins/org.python.pydev_2.6.0.2012062121/pysrc/pydevd.py", line 1175, in main
    return original_main(main_func, args, kwargs)
  File "/Library/Python/2.7/site-packages/django/utils/autoreload.py", line 138, in main
    reloader(main_func, args, kwargs)
  File "/Library/Python/2.7/site-packages/django/utils/autoreload.py", line 116, in python_reloader
    sys.exit(restart_with_reloader())
  File "/Applications/Aptana Studio 3/plugins/org.python.pydev_2.6.0.2012062121/pysrc/pydevd.py", line 1212, in restart_with_reloader
    popen = subprocess.Popen(args, env=new_environ)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 672, in __init__
    errread, errwrite)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1202, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

编辑2 根据要求提供更多调试信息:

args: ['xterm', '-e', '/usr/bin/python', '/Users/timo/Documents/aptana-studio-3-workspace/ssm/ssd/manage.py', 'runserver', '0.0.0.0:8000']

new_environ: {'PYTHONIOENCODING': 'UTF-8', 'RUN_MAIN': 'true', 'VERSIONER_PYTHON_PREFER_32_BIT': 'no', 'LOGNAME': 'timo', 'USER': 'timo', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'HOME': '/Users/timo', 'DISPLAY': '/tmp/launch-Hsa1eC/org.x:0', 'SHELL': '/bin/bash', 'TZ': 'Europe/Vienna', 'VERSIONER_PYTHON_VERSION': '2.7', 'SECURITYSESSIONID': '186a5', 'GL_ENABLE_DEBUG_ATTACH': 'YES', 'PYDEV_CONSOLE_ENCODING': 'UTF-8', 'com.apple.java.jvmTask': 'JNI', 'PYTHONPATH': '/Applications/Aptana Studio 3/plugins/org.python.pydev_2.6.0.2012062121/pysrc/pydev_sitecustomize:/Users/timo/Documents/aptana-studio-3-workspace/ssm/ssd:/Applications/Aptana Studio 3/plugins/org.python.pydev_2.6.0.2012062121/pysrc:/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip:/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7:/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin:/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac:/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages:/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python:/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk:/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old:/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload:/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC:/Library/Python/2.7/site-packages:/Applications/Aptana Studio 3/plugins/org.python.pydev.debug_2.4.0.2012020116/pysrc', 'SSH_AUTH_SOCK': '/tmp/launch-ILkkCc/Listeners', 'CELERY_LOADER': 'djcelery.loaders.DjangoLoader', 'Apple_PubSub_Socket_Render': '/tmp/launch-GuOmAI/Render', 'TMPDIR': '/var/folders/yw/7q8d2tzj70q1yqwwqhgkqsw00000gn/T/', 'APP_ICON_844': '../Resources/aptana.icns', 'PYDEV_COMPLETER_PYTHONPATH': '/Applications/Aptana Studio 3/plugins/org.python.pydev_2.6.0.2012062121/pysrc', '__CF_USER_TEXT_ENCODING': '0x1F5:0:0', 'Apple_Ubiquity_Message': '/tmp/launch-lxY2Pu/Apple_Ubiquity_Message', 'DJANGO_SETTINGS_MODULE': 'ssd.settings', 'COMMAND_MODE': 'unix2003'}

这里有两点需要注意。 1)我试图检查PYTHONPATH上的所有东西是否确实存在。除了/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip/Applications/Aptana Studio 3/plugins/org.python.pydev.debug_2.4.0.2012020116/pysrc之外,大多数情况都是如此,这让我想知道我是否只需要让Aptana重新扫描Python目录。 2)Aptana应用程序路径包含空格(默认情况下)。我见过一些罕见的案例,其中任何类型的图书馆仍然会扼杀它。

3 个答案:

答案 0 :(得分:1)

org.python.pydev.debug / pysrc真的被删除了(正如你发现的那样,正确的是org.python.pydev / pysrc)...将更新主页以反映:)

所以,这应该是有效的...现在,至于你的错误,请发布完整的错误日志(只有那部分,很难知道可能发生了什么 - 在这里测试它的路径和它确实有效。)

答案 1 :(得分:0)

不确定是否相关,但是我使用pydev将eclipse从3.6升级到4.2,将Aptana从2升级到3 现在我的调试器无法正常工作。 After upgrading eclipse, aptana, pydev, Debugger not working

答案 2 :(得分:0)

我也有这个问题,只是升级到PyDev 3.4.1,它为我修复了一些问题。如果您遇到问题,请仔细阅读http://pydev.org/manual_adv_debug_console.html