Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to Configure Celery in Flask Application #3

Open
mochiron-desu opened this issue Mar 29, 2024 · 1 comment
Open

Unable to Configure Celery in Flask Application #3

mochiron-desu opened this issue Mar 29, 2024 · 1 comment

Comments

@mochiron-desu
Copy link

Description

I'm encountering an issue while trying to configure Celery in my Flask application. Despite following the documentation and examples, I keep receiving an error message stating "Cannot mix new setting names with old setting names."

Steps to Reproduce:

  1. python app.py
  2. celery -A app.celery worker --loglevel=info -f celery.logs

Error

worker: Warm shutdown (MainProcess)
Process SpawnPoolWorker-43:
Traceback (most recent call last):
  File "d:\Coding\projects\LLM-Minutes-of-Meeting\.venv\Lib\site-packages\billiard\process.py", line 323, in _bootstrap
    self.run()
  File "d:\Coding\projects\LLM-Minutes-of-Meeting\.venv\Lib\site-packages\billiard\process.py", line 110, in run
    self._target(*self._args, **self._kwargs)
  File "d:\Coding\projects\LLM-Minutes-of-Meeting\.venv\Lib\site-packages\billiard\pool.py", line 288, in __call__
    self.after_fork()
  File "d:\Coding\projects\LLM-Minutes-of-Meeting\.venv\Lib\site-packages\billiard\pool.py", line 420, in after_fork
    self.initializer(*self.initargs)
  File "d:\Coding\projects\LLM-Minutes-of-Meeting\.venv\Lib\site-packages\celery\concurrency\prefork.py", line 53, in process_initializer
    app.loader.init_worker()
  File "d:\Coding\projects\LLM-Minutes-of-Meeting\.venv\Lib\site-packages\celery\loaders\base.py", line 110, in init_worker
    self.import_default_modules()
  File "d:\Coding\projects\LLM-Minutes-of-Meeting\.venv\Lib\site-packages\celery\loaders\base.py", line 105, in import_default_modules
    return [self.import_task_module(m) for m in self.default_modules]
                                                ^^^^^^^^^^^^^^^^^^^^
  File "d:\Coding\projects\LLM-Minutes-of-Meeting\.venv\Lib\site-packages\kombu\utils\objects.py", line 40, in __get__
    return super().__get__(instance, owner)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Applications\Python\Python11new\Lib\functools.py", line 1001, in __get__
    val = self.func(instance)
          ^^^^^^^^^^^^^^^^^^^
  File "d:\Coding\projects\LLM-Minutes-of-Meeting\.venv\Lib\site-packages\celery\loaders\base.py", line 227, in default_modules
    tuple(maybe_list(self.app.conf.imports)) +
                     ^^^^^^^^^^^^^^^^^^^^^
  File "d:\Coding\projects\LLM-Minutes-of-Meeting\.venv\Lib\site-packages\celery\utils\collections.py", line 111, in __getattr__
    return self[k]
           ~~~~^^^
  File "d:\Coding\projects\LLM-Minutes-of-Meeting\.venv\Lib\site-packages\celery\utils\collections.py", line 391, in __getitem__
    return getitem(k)
           ^^^^^^^^^^
  File "d:\Coding\projects\LLM-Minutes-of-Meeting\.venv\Lib\site-packages\celery\utils\collections.py", line 249, in __getitem__
    return mapping[_key]
           ~~~~~~~^^^^^^
  File "D:\Applications\Python\Python11new\Lib\collections\__init__.py", line 1122, in __getitem__
    if key in self.data:
              ^^^^^^^^^
  File "d:\Coding\projects\LLM-Minutes-of-Meeting\.venv\Lib\site-packages\kombu\utils\objects.py", line 40, in __get__
    return super().__get__(instance, owner)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Applications\Python\Python11new\Lib\functools.py", line 1001, in __get__
    val = self.func(instance)
          ^^^^^^^^^^^^^^^^^^^
  File "d:\Coding\projects\LLM-Minutes-of-Meeting\.venv\Lib\site-packages\celery\app\base.py", line 135, in data
    return self.callback()
           ^^^^^^^^^^^^^^^
  File "d:\Coding\projects\LLM-Minutes-of-Meeting\.venv\Lib\site-packages\celery\app\base.py", line 979, in _finalize_pending_conf
    conf = self._conf = self._load_config()
                        ^^^^^^^^^^^^^^^^^^^
  File "d:\Coding\projects\LLM-Minutes-of-Meeting\.venv\Lib\site-packages\celery\app\base.py", line 997, in _load_config
    settings = detect_settings(
               ^^^^^^^^^^^^^^^^
  File "d:\Coding\projects\LLM-Minutes-of-Meeting\.venv\Lib\site-packages\celery\app\utils.py", line 274, in detect_settings
    raise ImproperlyConfigured(info.mix_error.format(renames='\n'.join(
celery.exceptions.ImproperlyConfigured:

Cannot mix new setting names with old setting names, please
rename the following settings to use the old format:

include                              -> CELERY_INCLUDE

Or change all of the settings to use the new format :)

Installed packages and versions

accelerate==0.28.0
amqp==5.2.0
audioread==3.0.1
av==11.0.0
billiard==4.2.0
blinker==1.7.0
celery==5.3.6
certifi==2024.2.2
cffi==1.16.0
charset-normalizer==3.3.2
click==8.1.7
click-didyoumean==0.3.1
click-plugins==1.1.1
click-repl==0.3.0
colorama==0.4.6
coloredlogs==15.0.1
ctranslate2==4.1.0
decorator==5.1.1
faster-whisper==1.0.1
filelock==3.13.3
Flask==3.0.2
flatbuffers==24.3.25
fsspec==2024.3.1
huggingface-hub==0.22.1
humanfriendly==10.0
idna==3.6
itsdangerous==2.1.2
Jinja2==3.1.3
joblib==1.3.2
kombu==5.3.6
lazy_loader==0.3
librosa==0.10.1
llvmlite==0.42.0
MarkupSafe==2.1.5
mpmath==1.3.0
msgpack==1.0.8
networkx==3.2.1
numba==0.59.1
numpy==1.26.4
onnxruntime==1.17.1
packaging==24.0
platformdirs==4.2.0
pooch==1.8.1
prompt-toolkit==3.0.43
protobuf==5.26.1
psutil==5.9.8
pycparser==2.21
pydub==0.25.1
pyreadline3==3.4.1
python-dateutil==2.9.0.post0
python-dotenv==1.0.1
PyYAML==6.0.1
redis==5.0.3
regex==2023.12.25
requests==2.31.0
safetensors==0.4.2
scikit-learn==1.4.1.post1
scipy==1.12.0
six==1.16.0
soundfile==0.12.1
soxr==0.3.7
sympy==1.12
threadpoolctl==3.4.0
tokenizers==0.15.2
torch==2.2.2
torchaudio==2.2.2
tqdm==4.66.2
transformers==4.39.2
typing_extensions==4.10.0
tzdata==2024.1
urllib3==2.2.1
vine==5.1.0
wcwidth==0.2.13
Werkzeug==3.0.1

Proposed Solution:

Any suggestions or insights on how to resolve this issue would be greatly appreciated.

Thank you for your assistance!

@k-praveen-trellis
Copy link

Can you try again now? The project has been Updated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants