Celery - No module named 'celery.datastructures'
<p>i am using <code>Django 1.10</code> + <code>celery==4.0.0rc3</code> + <code>django-celery with commit @79d9689b62db3d54ebd0346e00287f91785f6355</code> .</p>

<p>My settings are:</p>

<pre><code>CELERY_RESULT_BACKEND = 'djcelery.backends.database:DatabaseBackend'
CELERY_ACCEPT_CONTENT = ['json']
CELERY_TASK_SERIALIZER = 'json'
CELERY_RESULT_SERIALIZER = 'json'
CELERY_TIMEZONE = TIME_ZONE
# http://docs.celeryproject.org/en/latest/getting-started/brokers/redis.html#visibility-timeout
BROKER_TRANSPORT_OPTIONS = {'visibility_timeout': 259200}  # 3 days
</code></pre>

<p>my tasks.py i have </p>

<pre><code>@task(queue='assign_rnal_id')
def assign_rnal_id_to_mongo(rnal_id, mongo_id):
    print ("something")

    return False
</code></pre>

<p>In my django model i am overriding the save method to send a task to celery:</p>

<pre><code>def save(self, *args, **kwargs):
    super(Suggested, self).save(*args, **kwargs)

        assign_rnal_id_to_mongo.delay(rnal_id=self.id, mongo_id=self.raw_data['_id'])
</code></pre>

<p>When i save my model object i get a <code>No module named 'celery.datastructures'</code></p>

<p>Any ideas?? I have similar code working for older versions of django and celery, did something change?</p>

<p>Thanks</p>

<p>I was able to find the answer here <a href="https://github.com/celery/celery/issues/3303#issuecomment-246780116" rel="nofollow">https://github.com/celery/celery/issues/3303#issuecomment-246780116</a></p>

<p>Basically <code>Django-celery does not support 4.0 yet</code> so i downgraded to <code>celery==3.1.23</code> and it now works</p>

python django celery django-celery