Opened 6 years ago

Closed 6 years ago

#9220 closed (wontfix)

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

Reported by: GDorn 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: UI/UX:

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 GDorn 6 years ago.
patch

Download all attachments as: .zip

Change History (2)

Changed 6 years ago by GDorn

patch

comment:1 Changed 6 years ago by jacob

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to wontfix
  • Status changed from new to closed

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