Opened 15 years ago

Closed 14 years ago

#13043 closed New feature (duplicate)

Default manage.py should print ImportError

Reported by: sdolan Owned by: nobody
Component: Core (Management commands) Version: 1.2-beta
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description

Problem

The error handling in the default manage.py for an ImportError is difficult/frustrating to debug if the error was not in importing the settings module itself.

Solution

Print out the ImportError exception when it occurs. The ImportError exception gives details of the actual module that failed to import.

Attachments (2)

13043__print_exception_in_default_manage_settings_import.patch (1.1 KB ) - added by sdolan 15 years ago.
13043__alternate_approach_with_more_info.patch (1.6 KB ) - added by Fred Palmer 15 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 by James Bennett, 15 years ago

milestone: 1.2

This isn't anywhere near critical enough to go on the 1.2 milestone.

comment:2 by Russell Keith-Magee, 15 years ago

Triage Stage: UnreviewedAccepted

This is something that falls in the general category of BetterErrorMessages.

in reply to:  2 comment:3 by Fred Palmer, 15 years ago

Replying to russellm:

This is something that falls in the general category of BetterErrorMessages.

Something similar was also requested in ticket:10696

I also attached an alternate approach that attempts to give more information like the traceback. It also passes pylint with a perfect score.

comment:4 by Luke Plant, 14 years ago

Type: New feature

comment:5 by Luke Plant, 14 years ago

Severity: Normal

comment:6 by patchhammer, 14 years ago

Easy pickings: unset
Patch needs improvement: set

13043alternate_approach_with_more_info.patch fails to apply cleanly on to trunk

comment:7 by Thejaswi Puthraya, 14 years ago

Component: UncategorizedCore (Management commands)
UI/UX: unset

comment:8 by Ramiro Morales, 14 years ago

Resolution: duplicate
Status: newclosed

duplicate of #14130 (that is newer, but is already fixed)

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