Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Aptana update breaks Django debugging

I set up my Aptana Studio 3 / PyDev debugger according to the instructions and even got to the point where everything worked, including breakpoints and auto-reload. Loved it. Now, as of an update last Saturday, the debugger doesn't work any more. I noticed that the

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

folder has gone missing. I found another pysrc folder in

Aptana Studio 3/plugins/org.python.pydev_x.x

which seems to contain the required pydevd module, together with the patch_django_autoreload() function and all. But if I put it on the Python path, I just get an ugly stack trace, ending in

OSError: [Errno 2] No such file or directory

Any ideas what's gone wrong here? Using Aptana Studio 3.2.0.201206251729, Django 1.3.1, Python 2.7.1 on OS X 10.7.4.

EDIT The full traceback:

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

EDIT 2 Some more debug info, as requested:

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'}

There's two things to note here. 1) I tried to check whether everything on the PYTHONPATH actually existed. This was mostly the case, except for /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip and /Applications/Aptana Studio 3/plugins/org.python.pydev.debug_2.4.0.2012020116/pysrc, which makes me wonder whether I just have to get Aptana to rescan the Python directories. 2) The Aptana application path contains spaces (by default). I've seen some rare cases where libraries of any kind still choke on that.

like image 710
Timo Avatar asked Aug 05 '26 18:08

Timo


1 Answers

The org.python.pydev.debug/pysrc is really removed (and the correct one is really org.python.pydev/pysrc as you found out)... Will update the homepage to reflect that :)

So, with this it should be working... Now, as for your error, please post the complete error log (with just that part, it's hard to know what may be happening -- tested it here with that path and it does work properly).

like image 111
Fabio Zadrozny Avatar answered Aug 07 '26 13:08

Fabio Zadrozny



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!