I get the following TypeError when I try to launch a celery worker AND
have unresolved system warnings:
Trying to launch celery worker...
{{{
celery -A my_project worker -l info
}}}
yields ...
{{{
File "/usr/local/etc/virtualenvs/gears/local/lib/python2.7/site-
packages/celery/fixups/django.py", line 162, in validate_models
cmd.check()
File "/usr/local/etc/virtualenvs/gears/local/lib/python2.7/site-
packages/django/core/management/base.py", line 530, in check
self.stderr.write(msg, lambda x: x)
TypeError: function takes exactly 1 argument (2 given)
}}}
It appears that Django is throwing a TypeError at
[https://github.com/django/django/blob/stable/1.8.x/django/core/management/base.py#L530
this line in django/core/management/base.py]
The problem "goes away" if I silence Django's system checks.
--
Ticket URL: <https://code.djangoproject.com/ticket/24477>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* needs_better_patch: => 0
* resolution: => invalid
* needs_tests: => 0
* needs_docs: => 0
Comment:
Hi,
This seems more like a bug on celery's side, caused by this line:
https://github.com/celery/celery/blob/master/celery/fixups/django.py#L161
Management's commands `self.stderr` and `self.stdout` should be instances
of `OutWrapper` whose `write()` method support more than one argument (in
this instance, a `style_func` argument used for formatting).
I'm going to mark this as `invalid`. Feel free to reopen if you think
there's really something we should fix on Django's end.
Thanks.
--
Ticket URL: <https://code.djangoproject.com/ticket/24477#comment:1>
Comment (by DavidMuller):
Ah, thanks for the details, that makes a lot of sense. I'll open up a
ticket with the Celery folks.
(https://github.com/celery/celery/issues/2536)
Thanks again!
--
Ticket URL: <https://code.djangoproject.com/ticket/24477#comment:2>