Opened 16 years ago

Closed 15 years ago

#9220 closed (wontfix)

AttributeError: 'module' object has no attribute APPNAME error when forgetting __init__.py

Reported by: Sam Thompson Owned by: nobody
Component: Uncategorized Version: 1.0
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

When adding an app to INSTALLED_APPS, if the app in question isn't a proper module (i.e. has init.py) the error

AttributeError: 'module' object has no attribute APPNAME

appears, where APPNAME is the first part of the path that fails.

Mostly, this is just not a very useful error message. I'm attaching a patch with a suggested message.

I have no idea what to categorize this as.

Attachments (1)

diff.txt (1000 bytes ) - added by Sam Thompson 16 years ago.
patch

Download all attachments as: .zip

Change History (2)

by Sam Thompson, 16 years ago

Attachment: diff.txt added

patch

comment:1 by Jacob, 15 years ago

Resolution: wontfix
Status: newclosed

Raising new exceptions in response to others is generally a bad idea -- it can hide the real exception in lots of cases.

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