Cannot import name _uuid_generate_random in heroku django

I am working on a project which scans user gmail inbox and provides a report. I have deployed it in heroku with following specs:

Language: Python 2.7

Framework: Django 1.8

Task scheduler: Celery ( Rabbitmq-bigwig for broker url)

Now when heroku execute it the celery is not giving me the output. On Heroku push its showing Collectstatic configuration error. I have tried using whitenoise package

Also tried executing: heroku run python collectstatic --dry-run --noinput Still getting the same error.

$ heroku run python collectstatic --noinput gave the following details of the error.

    File "", line 10, in <module>
    File "/app/.heroku/python/lib/python2.7/site-packages/django/core/management/", line 338, in execute_from_command_line
    File "/app/.heroku/python/lib/python2.7/site-packages/django/core/management/", line 303, in execute
    File "/app/.heroku/python/lib/python2.7/site-packages/django/conf/", line 48, in __getattr__
    File "/app/.heroku/python/lib/python2.7/site-packages/django/conf/", line 44, in _setup
    self._wrapped = Settings(settings_module)
    File "/app/.heroku/python/lib/python2.7/site-packages/django/conf/", line 92, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
    File "/app/.heroku/python/lib/python2.7/importlib/", line 37, in import_module
    File "/app/salesblocker/", line 5, in <module>
    from .celery import app as celery_app 
    File "/app/salesblocker/", line 5, in <module>
    from celery import Celery
    File "/app/.heroku/python/lib/python2.7/site-packages/celery/", line 131, in <module>
    from celery import five  # noqa
    File "/app/.heroku/python/lib/python2.7/site-packages/celery/", line 153, in <module>
    from kombu.utils.compat import OrderedDict  # noqa
    File "/app/.heroku/python/lib/python2.7/site-packages/kombu/utils/", line 19, in <module>
    from uuid import UUID, uuid4 as _uuid4, _uuid_generate_random
    ImportError: cannot import name _uuid_generate_random

I have also tried to rollback heroku commit to previous working commit and cloned that code but on the next commit(changes:removed a media image from the media folder) its showing the same error again.

Thanks in advance

You are coming across this issue, which affects Python 2.7.11 (Kombu is required by Celery).

The issue is fixed in Kombu 3.0.30.