I’m trying to deploy a django application. I have the docker image built and in Gitlab. It pulls OK, but errors out with this:
Sep 15 09:55:22 AM app_config = apps.get_containing_app_config(module)
Sep 15 09:55:22 AM ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Sep 15 09:55:22 AM File "/usr/local/lib/python3.11/site-packages/django/apps/registry.py", line 260, in get_containing_app_config
Sep 15 09:55:22 AM self.check_apps_ready()
Sep 15 09:55:22 AM File "/usr/local/lib/python3.11/site-packages/django/apps/registry.py", line 138, in check_apps_ready
Sep 15 09:55:22 AM raise AppRegistryNotReady("Apps aren't loaded yet.")
Sep 15 09:55:22 AM django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.
I build this locally and run in docker no problem, but for some reason, I can’t get this to work in Render. I’ve tried also building from code (rather than docker image), and I get the same error.
This typically occurs when you try to access Django models or perform database operations before the Django application has finished loading. There’s a limited amount of help we can provide here since we don’t have access to your code.
This error seems fairly common though. I have found a bunch of StackOverflow threads, have you gone through them?
Render Support, UTC+3
Thanks for the update. I’ve been through all of these, and just noting that this code comes up perfectly on my local Docker (using docker-compose).
It’s really quite odd. I even went from code based deploy to docker container deploy (same dockerfile that my local docker uses), and still same issue.
I’m now rewriting my django app to use your Poetry example, hoping that will work