Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » PyDev Djando debug configuration fails to import settings (Server successfully launches on Linux, fails in Eclipse)
PyDev Djando debug configuration fails to import settings [message #986262] Mon, 19 November 2012 16:39
Yacov Schondorf is currently offline Yacov SchondorfFriend
Messages: 1
Registered: November 2012
Junior Member
I am using Eclipse Java EE IDE for Web Developers, Indigo version.

settings.py file is located in <project root>/akita/onbox/akita-local-ui/src.
If I run the server from this directory using
python manage.py runserver 0.0.0.0:8000
the server runs successfully.

I have created a debug configuration as follows:
The project is "akita-local-ui" which is <project root>/akita/onbox/akita-local-ui.
The Main Module is ${workspace_loc:akita-local-ui/src/manage.py}
PYTHONPATH has /usr/lib64 entries, /usr/lib/python2.6 entries, <project root>/akita/onbox/akita-local-ui/src.
DJANGO_SETTINGS_MODULE is defined as settings

The debug run fails with following error:

pydev debugger: starting
Traceback (most recent call last):
File "/opt/eclipse/indigo-SR2/plugins/org.python.pydev_2.7.1.2012100913/pysrc/pydevd.py", line 1397, in <module>
debugger.run(setup['file'], None, None)
File "/opt/eclipse/indigo-SR2/plugins/org.python.pydev_2.7.1.2012100913/pysrc/pydevd.py", line 1090, in run
pydev_imports.execfile(file, globals, locals) #execute the script
File "/home/yacovs/dev/branches/main/akita/onbox/akita-local-ui/src/manage.py", line 14, in <module>
execute_manager(settings)
File "/usr/lib/python2.6/site-packages/django/core/management/__init__.py", line 459, in execute_manager
utility.execute()
File "/usr/lib/python2.6/site-packages/django/core/management/__init__.py", line 382, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/lib/python2.6/site-packages/django/core/management/__init__.py", line 261, in fetch_command
klass = load_command_class(app_name, subcommand)
File "/usr/lib/python2.6/site-packages/django/core/management/__init__.py", line 69, in load_command_class
module = import_module('%s.management.commands.%s' % (app_name, name))
File "/usr/lib/python2.6/site-packages/django/utils/importlib.py", line 35, in import_module
__import__(name)
File "/usr/lib/python2.6/site-packages/django/core/management/commands/runserver.py", line 8, in <module>
from django.core.servers.basehttp import AdminMediaHandler, run, WSGIServerException, get_internal_wsgi_application
File "/usr/lib/python2.6/site-packages/django/core/servers/basehttp.py", line 26, in <module>
from django.views import static
File "/usr/lib/python2.6/site-packages/django/views/static.py", line 95, in <module>
template_translatable = ugettext_noop(u"Index of %(directory)s")
File "/usr/lib/python2.6/site-packages/django/utils/translation/__init__.py", line 75, in gettext_noop
return _trans.gettext_noop(message)
File "/usr/lib/python2.6/site-packages/django/utils/translation/__init__.py", line 48, in __getattr__
if settings.USE_I18N:
File "/usr/lib/python2.6/site-packages/django/utils/functional.py", line 184, in inner
self._setup()
File "/usr/lib/python2.6/site-packages/django/conf/__init__.py", line 42, in _setup
self._wrapped = Settings(settings_module)
File "/usr/lib/python2.6/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 'akita-local-ui.settings' (Is it on sys.path?): No module named akita-local-ui.settings
Previous Topic:how to replace +- icons in eclipse tree view
Next Topic:Changed to C99 mode and now I have " 'asm' undeclared" errors
Goto Forum:
  


Current Time: Sun Dec 21 01:21:10 GMT 2014

Powered by FUDForum. Page generated in 0.01487 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software