Opened 7 years ago

Closed 5 years ago

Last modified 4 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:


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

Download all attachments as: .zip

Change History (6)

comment:1 Changed 7 years ago by jacob

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Design decision needed

Changed 5 years ago by alexr

Tiny patch to drop syntax error suggestion

comment:2 Changed 5 years ago by alexr

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

  • Has patch set
  • milestone set to 1.3

comment:4 Changed 5 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

In [15812]:

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

comment:5 Changed 4 years ago by jacob

  • milestone 1.3 deleted

Milestone 1.3 deleted

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