#19674 closed Bug (needsinfo)
AttributeError: 'Command' object has no attribute 'style'
Reported by: | Stefan Kögl | Owned by: | nobody |
---|---|---|---|
Component: | Core (Management commands) | Version: | 1.5-alpha-1 |
Severity: | Normal | Keywords: | |
Cc: | Stefan Kögl | Triage Stage: | Unreviewed |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
When testing #19665 (currently at c87f89c0db9314d26a3ad9afceb812e2d2f07f96) another (possibly related) exception was raised when executing the command
$ ./manage.py assign-upload-timestamps /usr/local/lib/python2.7/dist-packages/django/conf/__init__.py:219: DeprecationWarning: You have no filters defined on the 'mail_admins' logging handler: adding implicit debug-false-only filter. See http://docs.djangoproject.com/en/dev/releases/1.4/#request-exceptions-are-now-always-logged DeprecationWarning) Traceback (most recent call last): File "./manage.py", line 36, in <module> execute_manager(settings) File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 469, in execute_manager utility.execute() File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 392, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 225, in run_from_argv stderr = getattr(self, 'stderr', OutputWrapper(sys.stderr, self.style.ERROR)) AttributeError: 'Command' object has no attribute 'style'
Again, as no part of the trace refers to code of my application, I assume a bug in Django 1.5.
The same command does not raise any exceptions with Django 1.4.
Change History (5)
comment:1 by , 12 years ago
Cc: | added |
---|
follow-up: 5 comment:2 by , 12 years ago
comment:4 by , 12 years ago
Resolution: | → needsinfo |
---|---|
Status: | new → closed |
We definitely need more information about your code.
comment:5 by , 12 years ago
Note:
See TracTickets
for help on using tickets.
Is it possible that you overrided
BaseCommand.__init__
but forgot to callsuper
?