New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AttributeError: 'tuple' object has no attribute 'startswith' #883
Comments
I put in some print statements at various points of the stack trace, and got this:
Not sure if that helps. |
|
@mpenkov you can try debugging at a higher level, perhaps from |
Thank you for the fast reply. I managed to get it working by specifying queue as a keyword argument to the apply_async function. I'm happy to debug via celery.app.routes, but it's not on the stack trace. Where would I start? For reference, here's my celery init code: def _connect_to_celery():
broker = 'pyamqp://%s@%s' % (config.CONFIG.ampq_user, config.CONFIG.ampq_host)
app = celery.Celery('tasks', backend='rpc://', broker=broker)
app.conf.enable_utc = True
app.conf.timezone = 'UTC'
app.conf.worker_log_format = WORKER_LOG_FORMAT
app.conf.task_routes = {
'dbi2.celery.start_job': {'queue': SLOW_QUEUE_NAME},
'dbi2.celery._absorb_input_file': {'queue': SLOW_QUEUE_NAME},
}
return app
app = _connect_to_celery()
def _absorb_input_file(input_id, filepath, keep_file=False):
pass # do application-specific stuff here
absorb_input_file = app.task(_absorb_input_file) |
would love to know if this issue still persists |
I get the following exception when sending a task to a non-default queue (top line of the trace is my own code):
Now, the code that raises the exception is:
The above print function gives me:
so it is indeed a tuple, whereas the code is expecting a string.
If I remove my task routing by deleting this code in my celery initialization, as described here:
or, alternatively,
then everything works.
How can I get my task to work with the non-default queue?
The text was updated successfully, but these errors were encountered: