I just started working on a aptana based django project from home. The project works nicely on my windows based machine at work, and partially works on my Mac at home.
When I run
python manage.py runserver
from command line, my django project works fine. However, when I try running it via the aptana debug/run interface, (setup the same way i setup the config at work), I get this message:
pydev debugger: starting
Traceback (most recent call last):
File “/Applications/Aptana Studio 3/plugins/org.python.pydev.debug_2.4.0.2012020116/pysrc/pydevd.py”, line 1307, in
debugger.run(setup[‘file’], None, None)
File “/Applications/Aptana Studio 3/plugins/org.python.pydev.debug_2.4.0.2012020116/pysrc/pydevd.py”, line 1060, in run
pydev_imports.execfile(file, globals, locals) #execute the script
File “/Users/michael/Documents/Aptana Studio 3 Workspace/video-encoder-interface/src/VideoEncoderInterface/manage.py”, line 14, in
execute_manager(settings)
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/init.py”, line 459, in execute_manager
utility.execute()
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/init.py”, line 382, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/init.py”, line 261, in fetch_command
klass = load_command_class(app_name, subcommand)
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/init.py”, line 69, in load_command_class
module = import_module(‘%s.management.commands.%s’ % (app_name, name))
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/utils/importlib.py”, line 35, in import_module
import(name)
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/commands/runserver.py”, line 8, in
from django.core.servers.basehttp import AdminMediaHandler, run, WSGIServerException, get_internal_wsgi_application
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/servers/basehttp.py”, line 26, in
from django.views import static
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/views/static.py”, line 95, in
template_translatable = ugettext_noop(u”Index of %(directory)s”)
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/utils/translation/init.py”, line 75, in gettext_noop
return _trans.gettext_noop(message)
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/utils/translation/init.py”, line 48, in getattr
if settings.USE_I18N:
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/utils/functional.py”, line 184, in inner
self._setup()
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/conf/init.py”, line 42, in _setup
self._wrapped = Settings(settings_module)
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/conf/init.py”, line 95, in init
raise ImportError(“Could not import settings ‘%s’ (Is it on sys.path?): %s” % (self.SETTINGS_MODULE, e))
ImportError: Could not import settings ‘video-encoder-interface.settings’ (Is it on sys.path?): No module named video-encoder-interface.settings
One thing I have noticed that may be wrong (I don’t know how to fix it either), the last line refers to video-encoder-interface.settings where as I think it should be looking for VideoEncoderInterface, as that is the name of the package (video-encoder-interface is just the directory name for the aptana project directory)
Probably your PYTHONPATH is not properly set inside Eclipse/PyDev… Or maybe the settings module is not correct (right click project > propertis > pydev – django: the django settings module should be properly set there).
If you’re still not able to find it out, please post a screenshot of the pydev package explorer with your project configuration, and post the contents of your manage.py file.