Problems with current version of Celery (5.2.0)
With Celery 5.2.0 installed, I get the following cryptic error message when I start the worker:
-------------- celery@yoga v5.2.0 (dawn-chorus)
--- ***** -----
-- ******* ---- Linux-5.14.0-4-amd64-x86_64-with-glibc2.32 2021-11-12 23:18:41
- *** --- * ---
- ** ---------- [config]
- ** ---------- .> app: aleksis:0x7f454b855b80
- ** ---------- .> transport: redis://localhost:6379/0
- ** ---------- .> results:
- *** --- * --- .> concurrency: 12 (prefork)
-- ******* ---- .> task events: OFF (enable -E to monitor tasks in this worker)
--- ***** -----
-------------- [queues]
.> celery exchange=celery(direct) key=celery
[ERROR/ForkPoolWorker-1] Process ForkPoolWorker-1
Traceback (most recent call last):
File "/home/wethjo/dev/AlekSIS/apps/official/AlekSIS-Core/.venv/lib/python3.9/site-packages/billiard/process.py", line 327, in _bootstrap
self.run()
File "/home/wethjo/dev/AlekSIS/apps/official/AlekSIS-Core/.venv/lib/python3.9/site-packages/billiard/process.py", line 114, in run
self._target(*self._args, **self._kwargs)
File "/home/wethjo/dev/AlekSIS/apps/official/AlekSIS-Core/.venv/lib/python3.9/site-packages/billiard/pool.py", line 289, in __call__
self.after_fork()
File "/home/wethjo/dev/AlekSIS/apps/official/AlekSIS-Core/.venv/lib/python3.9/site-packages/billiard/pool.py", line 421, in after_fork
self.initializer(*self.initargs)
File "/home/wethjo/dev/AlekSIS/apps/official/AlekSIS-Core/.venv/lib/python3.9/site-packages/celery/concurrency/prefork.py", line 75, in process_initializer
task.__trace__ = build_tracer(name, task, app.loader, hostname,
File "/home/wethjo/dev/AlekSIS/apps/official/AlekSIS-Core/.venv/lib/python3.9/site-packages/celery/app/trace.py", line 361, in build_tracer
push_request = request_stack.push
AttributeError: 'NoneType' object has no attribute 'push'
[2021-11-12 23:18:42,058: WARNING/ForkPoolWorker-1] Process ForkPoolWorker-1:
[2021-11-12 23:18:42,058: WARNING/ForkPoolWorker-1] Traceback (most recent call last):
[2021-11-12 23:18:42,058: WARNING/ForkPoolWorker-1] File "/home/wethjo/dev/AlekSIS/apps/official/AlekSIS-Core/.venv/lib/python3.9/site-packages/billiard/process.py", line 327, in _bootstrap
self.run()
[2021-11-12 23:18:42,058: WARNING/ForkPoolWorker-1] File "/home/wethjo/dev/AlekSIS/apps/official/AlekSIS-Core/.venv/lib/python3.9/site-packages/billiard/process.py", line 114, in run
self._target(*self._args, **self._kwargs)
[2021-11-12 23:18:42,058: WARNING/ForkPoolWorker-1] File "/home/wethjo/dev/AlekSIS/apps/official/AlekSIS-Core/.venv/lib/python3.9/site-packages/billiard/pool.py", line 289, in __call__
self.after_fork()
[2021-11-12 23:18:42,058: WARNING/ForkPoolWorker-1] File "/home/wethjo/dev/AlekSIS/apps/official/AlekSIS-Core/.venv/lib/python3.9/site-packages/billiard/pool.py", line 421, in after_fork
self.initializer(*self.initargs)
[2021-11-12 23:18:42,058: WARNING/ForkPoolWorker-1] File "/home/wethjo/dev/AlekSIS/apps/official/AlekSIS-Core/.venv/lib/python3.9/site-packages/celery/concurrency/prefork.py", line 75, in process_initializer
task.__trace__ = build_tracer(name, task, app.loader, hostname,
[2021-11-12 23:18:42,058: WARNING/ForkPoolWorker-1] File "/home/wethjo/dev/AlekSIS/apps/official/AlekSIS-Core/.venv/lib/python3.9/site-packages/celery/app/trace.py", line 361, in build_tracer
push_request = request_stack.push
[2021-11-12 23:18:42,058: WARNING/ForkPoolWorker-1] AttributeError: 'NoneType' object has no attribute 'push'
With Celery 5.1.2, the message doesn't appear.