Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#4567 closed (invalid)

(Ubuntu Feisty) Server won't start

Reported by: john.m.chilton@… Owned by: Adrian Holovaty
Component: runserver Version: 0.95
Severity: Keywords: runserver
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


I am using Ubuntu 7.04, Feisty. I used Synaptic to install the official, newest release of django for Ubuntu, which is 0.95.1 even though 0.96 is out. I ran " startproject webpoll" which completed succesfully, and then I moved into the new directory. Running "python runserver" resulted in the following traceback:

john@devbox:~/webpoll$ python runserver
Traceback (most recent call last):

File "", line 11, in <module>


File "/var/lib/python-support/python2.5/django/core/", line 1319, in execute_manager

execute_from_command_line(action_mapping, argv)

File "/var/lib/python-support/python2.5/django/core/", line 1271, in execute_from_command_line

action_mapping[action](addr, port, options.use_reloader)

File "/var/lib/python-support/python2.5/django/core/", line 1029, in runserver

from django.core.handlers.wsgi import WSGIHandler

File "/var/lib/python-support/python2.5/django/core/handlers/", line 1, in <module>

from django.core.handlers.base import BaseHandler

File "/var/lib/python-support/python2.5/django/core/handlers/", line 3, in <module>

from django import http

File "/var/lib/python-support/python2.5/django/http/", line 2, in <module>

from Cookie import SimpleCookie

ValueError: bad marshal data

" runserver" also failed, but gave a different traceback:

john@devbox:~/webpoll$ runserver
Traceback (most recent call last):

File "/usr/bin/", line 5, in <module>


File "/var/lib/python-support/python2.5/django/core/", line 1237, in execute_from_command_line

from django.utils import translation

File "/var/lib/python-support/python2.5/django/utils/translation/", line 3, in <module>

if settings.USE_I18N:

File "/var/lib/python-support/python2.5/django/conf/", line 27, in getattr


File "/var/lib/python-support/python2.5/django/conf/", line 52, in _import_settings

raise EnvironmentError, "Environment variable %s is undefined." % ENVIRONMENT_VARIABLE

EnvironmentError: Environment variable DJANGO_SETTINGS_MODULE is undefined.

Change History (2)

comment:1 Changed 12 years ago by paul.bowsher@…

Resolution: invalid
Status: newclosed

Please ask this question in the Django Users mailing list

comment:2 Changed 12 years ago by anon

You need to set your environment variables up correctly. Django is looking for your settings module and it can't find it. You need to go to your home directory and do export DJANGO_SETTINGS_MODULE = path to your settings file.

Note: See TracTickets for help on using tickets.
Back to Top