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

Error When Deploying Django App with Version 5.1 #26

Open
ericknavarro97 opened this issue Aug 9, 2024 · 0 comments
Open

Error When Deploying Django App with Version 5.1 #26

ericknavarro97 opened this issue Aug 9, 2024 · 0 comments

Comments

@ericknavarro97
Copy link

I encountered an error while deploying my Django application using the following versions:

  • Django==5.1
  • jet_admin==1.9.11

Python version: 3.10-slim

Error:

ERROR 2024-08-09 14:36:32,059 signal 1 140606240648064 Signal handler <bound method DjangoFixup.on_import_modules of <celery.fixups.django.DjangoFixup object at 0x7fe16f01e740>> raised: ImportError("cannot import name 'get_storage_class' from 'django.core.files.storage' (/usr/local/lib/python3.10/site-packages/django/core/files/storage/__init__.py)")
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/celery/utils/dispatch/signal.py", line 276, in send
    response = receiver(signal=self, sender=sender, **named)
  File "/usr/local/lib/python3.10/site-packages/celery/fixups/django.py", line 100, in on_import_modules
    self.worker_fixup.validate_models()
  File "/usr/local/lib/python3.10/site-packages/celery/fixups/django.py", line 138, in validate_models
    self.django_setup()
  File "/usr/local/lib/python3.10/site-packages/celery/fixups/django.py", line 134, in django_setup
    django.setup()
  File "/usr/local/lib/python3.10/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/usr/local/lib/python3.10/site-packages/django/apps/registry.py", line 124, in populate
    app_config.ready()
  File "/usr/local/lib/python3.10/site-packages/jet_django/apps.py", line 11, in ready
    from jet_django.configuration import JetDjangoConfiguration
  File "/usr/local/lib/python3.10/site-packages/jet_django/configuration.py", line 9, in <module>
    from django.core.files.storage import get_storage_class
ImportError: cannot import name 'get_storage_class' from 'django.core.files.storage' (/usr/local/lib/python3.10/site-packages/django/core/files/storage/__init__.py)
Traceback (most recent call last):
  File "/usr/local/bin/celery", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.10/site-packages/celery/__main__.py", line 15, in main
    sys.exit(_main())
  File "/usr/local/lib/python3.10/site-packages/celery/bin/celery.py", line 236, in main
    return celery(auto_envvar_prefix="CELERY")
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/click/decorators.py", line 33, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/celery/bin/base.py", line 135, in caller
    return f(ctx, *args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/celery/bin/worker.py", line 348, in worker
    worker = app.Worker(
  File "/usr/local/lib/python3.10/site-packages/celery/worker/worker.py", line 93, in __init__
    self.app.loader.init_worker()
  File "/usr/local/lib/python3.10/site-packages/celery/loaders/base.py", line 110, in init_worker
    self.import_default_modules()
  File "/usr/local/lib/python3.10/site-packages/celery/loaders/base.py", line 104, in import_default_modules
    raise response
  File "/usr/local/lib/python3.10/site-packages/celery/utils/dispatch/signal.py", line 276, in send
    response = receiver(signal=self, sender=sender, **named)
  File "/usr/local/lib/python3.10/site-packages/celery/fixups/django.py", line 100, in on_import_modules
    self.worker_fixup.validate_models()
  File "/usr/local/lib/python3.10/site-packages/celery/fixups/django.py", line 138, in validate_models
    self.django_setup()
  File "/usr/local/lib/python3.10/site-packages/celery/fixups/django.py", line 134, in django_setup
    django.setup()
  File "/usr/local/lib/python3.10/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/usr/local/lib/python3.10/site-packages/django/apps/registry.py", line 124, in populate
    app_config.ready()
  File "/usr/local/lib/python3.10/site-packages/jet_django/apps.py", line 11, in ready
    from jet_django.configuration import JetDjangoConfiguration
  File "/usr/local/lib/python3.10/site-packages/jet_django/configuration.py", line 9, in <module>
    from django.core.files.storage import get_storage_class
ImportError: cannot import name 'get_storage_class' from 'django.core.files.storage' (/usr/local/lib/python3.10/site-packages/django/core/files/storage/__init__.py)
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

1 participant