Opened 8 years ago

Closed 6 years ago

Last modified 5 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: UI/UX:

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 6 years ago.
Tiny patch to drop syntax error suggestion

Download all attachments as: .zip

Change History (6)

comment:1 Changed 8 years ago by Jacob

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Triage Stage: UnreviewedDesign decision needed

Changed 6 years ago by Alex Robbins

Tiny patch to drop syntax error suggestion

comment:2 Changed 6 years ago by Alex Robbins

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 Changed 6 years ago by Chris Adams

Has patch: set
milestone: 1.3

comment:4 Changed 6 years ago by Adrian Holovaty

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 Changed 5 years ago by Jacob

milestone: 1.3

Milestone 1.3 deleted

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