Opened 19 years ago

Closed 19 years ago

Last modified 18 years ago

#272 closed defect (invalid)

Error while executing

Reported by: rodrigo74@… Owned by: Adrian Holovaty
Component: contrib.admin Version:
Severity: normal Keywords:
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 following the part 1 of the tutorial, on a Windows XP SP2 machine.

I had no problems until I tried to run the command

django-admin.py init --settings=myproject.settings.main

The error I got:

C:\myproject>django-admin.py init --settings=myproject.settings.main
Traceback (most recent call last):
  File "C:\django_src\django\bin\django-admin.py", line 115, in ?
    main()
  File "C:\django_src\django\bin\django-admin.py", line 69, in main
    ACTION_MAPPING[action]()
  File "C:\Python24\lib\site-packages\django\core\management.py", line 289, in i
nit
    from django.core import db, meta
  File "C:\Python24\lib\site-packages\django\core\db\__init__.py", line 16, in ?

    from django.conf.settings import DATABASE_ENGINE
  File "C:\Python24\lib\site-packages\django\conf\settings.py", line 34, in ?
    raise EnvironmentError, "Could not import %s '%s' (is it on sys.path?): %s"
% (ENVIRONMENT_VARIABLE, me.SETTINGS_MODULE, e)
EnvironmentError: Could not import DJANGO_SETTINGS_MODULE 'myproject.settings.ma
in' (is it on sys.path?): No module named myproject.settings.main

I also tried to set the environment variable DJANGO_SETTINGS_MODULE but got the same error message.

I am using the svn version from 4.aug.2005

Change History (1)

comment:1 by Jacob, 19 years ago

Resolution: invalid
Status: newclosed

This is because your settings module is not in PYTHONPATH (it says so in the error message). Please don't use the ticket system for support questions; make a post to django-users or ask on IRC.

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