Opened 15 years ago

Closed 13 years ago

Last modified 13 years ago

#10654 closed (fixed)

incorrect error message for missing config

Reported by: gutworth Owned by: nobody
Component: Core (Other) Version: 1.0
Severity: Keywords:
Cc: Triage Stage: Design decision needed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

In django.conf.init, the ImportError for settings is reraised with a different message: "Could not import settings '%s' (Is it on sys.path? Does it have syntax errors?): %s"

The part about the syntax error is not correct because in that case a SyntaxError would be raised.

Attachments (1)

drop_incorrect_syntax_suggestion.patch (791 bytes ) - added by Alex Robbins 13 years ago.
Tiny patch to drop syntax error suggestion

Download all attachments as: .zip

Change History (6)

comment:1 by Jacob, 15 years ago

Triage Stage: UnreviewedDesign decision needed

by Alex Robbins, 13 years ago

Tiny patch to drop syntax error suggestion

comment:2 by Alex Robbins, 13 years ago

I checked this and this error message only showed when there was actually an import error. If I caused a syntax error, then I saw a syntax error, not an import error.

comment:3 by Chris Adams, 13 years ago

Has patch: set
milestone: 1.3

comment:4 by Adrian Holovaty, 13 years ago

Resolution: fixed
Status: newclosed

In [15812]:

Fixed #10654 -- Removed 'Does it have syntax errors' from the ImportError in django/conf/init.py. Evidently syntax errors raise a SyntaxError. Thanks, gutworth and alexr

comment:5 by Jacob, 13 years ago

milestone: 1.3

Milestone 1.3 deleted

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