-
-
Notifications
You must be signed in to change notification settings - Fork 5k
3.1.25 >3.1.26 Regression: ImportError: cannot import name '_detect_environment' #4619
Copy link
Copy link
Closed
Closed
Copy link
Description
I think this is due to 3.1.26 expecting Kombu 4.x, which AFAIK is not compatible with celery 3.x
ubuntu@ciaran:/opt/master$ venv/bin/pip install celery==3.1.26
Collecting celery==3.1.26
Using cached celery-3.1.26-py2.py3-none-any.whl
Requirement already satisfied: billiard<3.4,>=3.3.0.23 in ./venv/lib/python3.6/site-packages (from celery==3.1.26)
Requirement already satisfied: pytz>dev in ./venv/lib/python3.6/site-packages (from celery==3.1.26)
Requirement already satisfied: kombu<3.1,>=3.0.37 in ./venv/lib/python3.6/site-packages (from celery==3.1.26)
Requirement already satisfied: amqp<2.0,>=1.4.9 in ./venv/lib/python3.6/site-packages (from kombu<3.1,>=3.0.37->celery==3.1.26)
Requirement already satisfied: anyjson>=0.3.3 in ./venv/lib/python3.6/site-packages (from kombu<3.1,>=3.0.37->celery==3.1.26)
Installing collected packages: celery
Found existing installation: celery 3.1.25
Uninstalling celery-3.1.25:
Successfully uninstalled celery-3.1.25
Successfully installed celery-3.1.26
Stacktrace
/opt/master/venv/bin/python /opt/master/src/manage.py celeryd -lINFO
Traceback (most recent call last):
File "/opt/master/src/manage.py", line 15, in <module>
execute_from_command_line(sys.argv)
File "/opt/master/venv/lib/python3.6/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
utility.execute()
File "/opt/master/venv/lib/python3.6/site-packages/django/core/management/__init__.py", line 356, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/opt/master/venv/lib/python3.6/site-packages/djcelery/management/base.py", line 107, in run_from_argv
return super(CeleryCommand, self).run_from_argv(argv)
File "/opt/master/venv/lib/python3.6/site-packages/django/core/management/base.py", line 283, in run_from_argv
self.execute(*args, **cmd_options)
File "/opt/master/venv/lib/python3.6/site-packages/djcelery/management/base.py", line 100, in execute
super(CeleryCommand, self).execute(*args, **options)
File "/opt/master/venv/lib/python3.6/site-packages/django/core/management/base.py", line 330, in execute
output = self.handle(*args, **options)
File "/opt/master/venv/lib/python3.6/site-packages/djcelery/management/commands/celeryd.py", line 25, in handle
worker.run(**options)
File "/opt/master/venv/lib/python3.6/site-packages/celery/bin/worker.py", line 212, in run
state_db=self.node_format(state_db, hostname), **kwargs
File "/opt/master/venv/lib/python3.6/site-packages/celery/worker/__init__.py", line 100, in __init__
self.setup_instance(**self.prepare_args(**kwargs))
File "/opt/master/venv/lib/python3.6/site-packages/celery/worker/__init__.py", line 141, in setup_instance
self.blueprint.apply(self, **kwargs)
File "/opt/master/venv/lib/python3.6/site-packages/celery/bootsteps.py", line 221, in apply
step.include(parent)
File "/opt/master/venv/lib/python3.6/site-packages/celery/bootsteps.py", line 388, in include
inc, ret = self._should_include(parent)
File "/opt/master/venv/lib/python3.6/site-packages/celery/bootsteps.py", line 344, in _should_include
return True, self.create(parent)
File "/opt/master/venv/lib/python3.6/site-packages/celery/worker/components.py", line 245, in create
prefetch_multiplier=w.prefetch_multiplier,
File "/opt/master/venv/lib/python3.6/site-packages/celery/bootsteps.py", line 340, in instantiate
return instantiate(name, *args, **kwargs)
File "/opt/master/venv/lib/python3.6/site-packages/celery/utils/imports.py", line 53, in instantiate
return symbol_by_name(name)(*args, **kwargs)
File "/opt/master/venv/lib/python3.6/site-packages/kombu/utils/__init__.py", line 96, in symbol_by_name
module = imp(module_name, package=package, **kwargs)
File "/usr/local/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/opt/master/venv/lib/python3.6/site-packages/celery/worker/consumer/__init__.py", line 3, in <module>
from .consumer import Consumer
File "/opt/master/venv/lib/python3.6/site-packages/celery/worker/consumer/consumer.py", line 19, in <module>
from kombu.utils.compat import _detect_environment
ImportError: cannot import name '_detect_environment'
Process finished with exit code 1
Can't find what could cause this in the diff
Reactions are currently unavailable