Upgrading to Celery 5.0.0 breaks flower due to change in celery.bin.base module.
If you run flower with Celery 5.0.0 or if you use the docker image, it will say it cannot import "Command".
Steps to reproduce the behavior:
pip install celery==5.0.0THENflower --versionORflower -A proj --broker=redis://redisORflower

The Command class is no longer part of the base module: https://docs.celeryproject.org/en/v5.0.0/reference/celery.bin.base.html
Which means it can no longer import and inherit Command:
from __future__ import absolute_import
from __future__ import print_function
import os
import sys
import atexit
import signal
import logging
from pprint import pformat
from logging import NullHandler
from tornado.options import options
from tornado.options import parse_command_line, parse_config_file
from tornado.log import enable_pretty_logging
from celery.bin.base import Command
from . import __version__
from .app import Flower
from .urls import settings
from .utils import abs_path, prepend_url
from .options import DEFAULT_CONFIG_FILE, default_options
logger = logging.getLogger(__name__)
class FlowerCommand(Command):
# ...
Same problem here
Same problem here as well
Same problem here also.
Same for me, needed downgrade to 4.4.7
Same here, also had to downgrade sadly
Same for me, dowgraded celery to 4.4.7 as @packetflow
Same problem for me
Hello All,
A work around if you don't want to downgrade all of celery is to use a docker container for flower:
flower:
image: mher/flower
command: ["--app your_app", "--url_prefix=flower", "--broker=redis://redis"]
ports:
- 5555:5555
restart: unless-stopped
Why was the issue closed? Is this resolved?
This issue should not be closed because not solved
Regards
@mbayabo @mher Please keep one of the #1031 or #1029 open.
@mbayabo @mher Please keep one of the #1031 or #1029 open.
I didn't close this.
@mbayabo I guess you accidentally clicked the "close and comment" button https://github.com/mher/flower/issues/1029#event-3837160460 but you should be able to re-open this issue.
@chrisburr Oh I see.
Same problem for me, even using the docker image. Should I use a specific tag?
Hello All,
A work around if you don't want to downgrade all of celery is to use a docker container for flower:
flower: image: mher/flower command: ["--app your_app", "--url_prefix=flower", "--broker=redis://redis"] ports: - 5555:5555 restart: unless-stopped
I solved creating a custom docker image in which I install flower and celery (version 4.4.7) using pip and then using my docker image.
FROM python:3.8.2-slim-buster
RUN apt-get update && apt-get install -y gcc python3-dev
RUN pip install --no-cache-dir -Iv flower redis celery==4.4.7
EXPOSE 5555
ENTRYPOINT ["flower"]
You can use 0.9.5 tag with docker image
You can use
0.9.5tag with docker image
This one is working too. Thanks
You can use
0.9.5tag with docker image
This gets around this issue but then we run into the permissions issue if using persistent=True (which I think is fixed in latest). Any workaround besides creating another Dockerfile?
creating a docker image seems to connect but can't seem to access the GUI via localhost:5555 any clues?
edit: tried the custom image suggested by @ale8193 but having the same issue, it seems to be running properly but can´t access GUI