Opened 5 years ago

Closed 4 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)

Change History (10)

comment:1 Changed 5 years ago by ubernostrum

  • milestone 1.2 deleted
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

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

comment:2 follow-up: Changed 5 years ago by russellm

  • Triage Stage changed from Unreviewed to Accepted

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

comment:3 in reply to: ↑ 2 Changed 5 years ago by freddie

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 Changed 4 years ago by lukeplant

  • Type set to New feature

comment:5 Changed 4 years ago by lukeplant

  • Severity set to Normal

comment:6 Changed 4 years ago by patchhammer

  • Easy pickings unset
  • Patch needs improvement set

13043alternate_approach_with_more_info.patch fails to apply cleanly on to trunk

comment:7 Changed 4 years ago by thejaswi_puthraya

  • Component changed from Uncategorized to Core (Management commands)
  • UI/UX unset

comment:8 Changed 4 years ago by ramiro

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

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

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