Opened 18 years ago

Closed 18 years ago

Last modified 17 years ago

#4567 closed (invalid)

(Ubuntu Feisty) Server won't start

Reported by: john.m.chilton@… Owned by: Adrian Holovaty
Component: django-admin.py 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

Description

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 "django-admin.py startproject webpoll" which completed succesfully, and then I moved into the new directory. Running "python manage.py runserver" resulted in the following traceback:

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

File "manage.py", line 11, in <module>

execute_manager(settings)

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

execute_from_command_line(action_mapping, argv)

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

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

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

from django.core.handlers.wsgi import WSGIHandler

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

from django.core.handlers.base import BaseHandler

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

from django import http

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

from Cookie import SimpleCookie

ValueError: bad marshal data

"django-admin.py runserver" also failed, but gave a different traceback:

john@devbox:~/webpoll$ django-admin.py runserver
Traceback (most recent call last):

File "/usr/bin/django-admin.py", line 5, in <module>

management.execute_from_command_line()

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

from django.utils import translation

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

if settings.USE_I18N:

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

self._import_settings()

File "/var/lib/python-support/python2.5/django/conf/init.py", 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 by paul.bowsher@…, 18 years ago

Resolution: invalid
Status: newclosed

Please ask this question in the Django Users mailing list

comment:2 by anon, 17 years ago

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