Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6942563
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:02:14+00:00 2026-05-27T13:02:14+00:00

I wrote an django app named task, and added it to *INSTALLED_APPS*. However when

  • 0

I wrote an django app named “task”, and added it to *INSTALLED_APPS*.
However when I tried to call it in django shell it raised a NotRegistered expception. Detail information is below:

from task.tasks import add
from celery import registry

# 'task.tasks.add' is registered like below
registry.tasks  # 'task.tasks.add': <@task: task.tasks.add>

# Call add()
r = add.delay(3, 4)
r.successful()  # print "False"

################  celery debug info:    #############################
The full contents of the message body was:
{'retries': 0, 'task': 'task.tasks.add', 'args': (3, 4), 'expires': None, 'eta': None, 'kwargs': {}, 'id': '36d25389-7a0b-4a0a-98f8-d7a17ef9192e'}

Traceback (most recent call last):
  File "/usr/local/lib/python2.6/site-packages/celery/worker/consumer.py", line 427, in receive_message
    eventer=self.event_dispatcher)
  File "/usr/local/lib/python2.6/site-packages/celery/worker/job.py", line 297, in from_message
    on_ack=on_ack, delivery_info=delivery_info, **kw)
  File "/usr/local/lib/python2.6/site-packages/celery/worker/job.py", line 261, in __init__
    self.task = registry.tasks[self.task_name]
  File "/usr/local/lib/python2.6/site-packages/celery/registry.py", line 66, in __getitem__
    raise self.NotRegistered(key)
NotRegistered: 'task.tasks.add'

UPDATED:
My task definition:

from celery.task import task
@task
def add(x, y):
    return x + y
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T13:02:14+00:00Added an answer on May 27, 2026 at 1:02 pm

    I bet that the name registered in the worker is not the same as in the client.

    Start celeryd with

    celery worker -l info
    

    To see a list of registered tasks, then make sure that the task you want is listed with the exact same name.

    See here for the reason why this is important, and some common causes:
    http://docs.celeryproject.org/en/latest/userguide/tasks.html#task-names
    , and especially:
    http://docs.celeryproject.org/en/latest/userguide/tasks.html#automatic-naming-and-relative-imports

    If your task is listed with the same name then you could have an old
    worker still running that is not updated with the latest code.
    Kill all running workers with

    ps auxww | awk ' /celeryd/ {print $2}' | xargs kill -9
    

    (note this will terminate all running tasks, and you may not get them back
    when using the redis transport)

    In the future you should make sure you don’t launch new workers on top of old
    ones by using the --pidfile argument to celeryd.

    @linux-warrior:
    Actually, the task decorator supports both invocations (with parents or without),
    by using some dark magic 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wrote a simple contact form for a client in Django. However, whenever it
I wrote a django app, but I have a little problem with the file
I have a django app and I wrote a fabric script that installs my
I’ve got a Django project, to which I added the South app about halfway
For a mock web service I wrote a little Django app, that serves as
I'm using Django to write a blog app, and I'm trying to implement a
Here's a Django model class I wrote. This class gets a keyerror when I
I'm using Django Paginator everywhere on my website and even wrote a special template
In a django app, i need to show the result of a search ,
If I want to write a django app with Amazon SimpleDB, should I install

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.