Hi,

Did anyone hit this error before during production server or any type of
deployment. We tried deployment using Digital Oceanś App platform as a
pre-prod deployment to check whether this App platform is feasible for our
Django web site, but we are hitting this error no matter what ever
modification we change in settings.py to avoid this error. Tried a lot of
Google search results to address this issue, but no luck so far. We are
wondering whether anyone has any recommendations on this error. If you did
not try Digital Oceanś app platform, what would be your recommendation for
production server deployment? We are planning to use only app platforms to
avoid infrastructure overhead.


> [2023-12-17 01:40:06] │ -----> $ python manage.py collectstatic --noinput
> [2023-12-17 01:40:06] │        Traceback (most recent call last):
> [2023-12-17 01:40:06] │          File "/workspace/manage.py", line 23, in
> <module>
> [2023-12-17 01:40:06] │            execute_from_command_line(sys.argv)
> [2023-12-17 01:40:06] │          File
> "/app/.heroku/python/lib/python3.11/site-packages/django/core/management/__init__.py",
> line 446, in execute_from_command_line
> [2023-12-17 01:40:06] │            utility.execute()
> [2023-12-17 01:40:06] │          File
> "/app/.heroku/python/lib/python3.11/site-packages/django/core/management/__init__.py",
> line 420, in execute
> [2023-12-17 01:40:06] │            django.setup()
> [2023-12-17 01:40:06] │          File
> "/app/.heroku/python/lib/python3.11/site-packages/django/__init__.py", line
> 24, in setup
> [2023-12-17 01:40:06] │            apps.populate(settings.INSTALLED_APPS)
> [2023-12-17 01:40:06] │          File
> "/app/.heroku/python/lib/python3.11/site-packages/django/apps/registry.py",
> line 91, in populate
> [2023-12-17 01:40:06] │            app_config = AppConfig.create(entry)
> [2023-12-17 01:40:06] │                         ^^^^^^^^^^^^^^^^^^^^^^^
> [2023-12-17 01:40:06] │          File
> "/app/.heroku/python/lib/python3.11/site-packages/django/apps/config.py",
> line 228, in create
> [2023-12-17 01:40:06] │            import_module(entry)
> [2023-12-17 01:40:06] │          File
> "/app/.heroku/python/lib/python3.11/importlib/__init__.py", line 126, in
> import_module
> [2023-12-17 01:40:06] │            return
> _bootstrap._gcd_import(name[level:], package, level)
> [2023-12-17 01:40:06] │
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> [2023-12-17 01:40:06] │          File "<frozen importlib._bootstrap>",
> line 1204, in _gcd_import
> [2023-12-17 01:40:06] │          File "<frozen importlib._bootstrap>",
> line 1176, in _find_and_load
> [2023-12-17 01:40:06] │          File "<frozen importlib._bootstrap>",
> line 1147, in _find_and_load_unlocked
> [2023-12-17 01:40:06] │          File "<frozen importlib._bootstrap>",
> line 690, in _load_unlocked
> [2023-12-17 01:40:06] │          File "<frozen
> importlib._bootstrap_external>", line 940, in exec_module
> [2023-12-17 01:40:06] │          File "<frozen importlib._bootstrap>",
> line 241, in _call_with_frames_removed
> [2023-12-17 01:40:06] │          File
> "/app/.heroku/python/lib/python3.11/site-packages/django_tables2/__init__.py",
> line 1, in <module>
> [2023-12-17 01:40:06] │            from .columns import (
> [2023-12-17 01:40:06] │          File
> "/app/.heroku/python/lib/python3.11/site-packages/django_tables2/columns/__init__.py",
> line 8, in <module>
> [2023-12-17 01:40:06] │            from .jsoncolumn import JSONColumn
> [2023-12-17 01:40:06] │          File
> "/app/.heroku/python/lib/python3.11/site-packages/django_tables2/columns/jsoncolumn.py",
> line 11, in <module>
> [2023-12-17 01:40:06] │            from django.contrib.postgres.fields
> import HStoreField
> [2023-12-17 01:40:06] │          File
> "/app/.heroku/python/lib/python3.11/site-packages/django/contrib/postgres/fields/__init__.py",
> line 1, in <module>
> [2023-12-17 01:40:06] │            from .array import *  # NOQA
> [2023-12-17 01:40:06] │            ^^^^^^^^^^^^^^^^^^^^
> [2023-12-17 01:40:06] │          File
> "/app/.heroku/python/lib/python3.11/site-packages/django/contrib/postgres/fields/array.py",
> line 3, in <module>
> [2023-12-17 01:40:06] │            from django.contrib.postgres import
> lookups
> [2023-12-17 01:40:06] │          File
> "/app/.heroku/python/lib/python3.11/site-packages/django/contrib/postgres/lookups.py",
> line 4, in <module>
> [2023-12-17 01:40:06] │            from .search import SearchVector,
> SearchVectorExact, SearchVectorField
> [2023-12-17 01:40:06] │          File
> "/app/.heroku/python/lib/python3.11/site-packages/django/contrib/postgres/search.py",
> line 1, in <module>
> [2023-12-17 01:40:06] │            import psycopg2
> [2023-12-17 01:40:06] │          File
> "/app/.heroku/python/lib/python3.11/site-packages/psycopg2/__init__.py",
> line 51, in <module>
> [2023-12-17 01:40:06] │            from psycopg2._psycopg import (
>             # noqa
> [2023-12-17 01:40:06] │        SystemError: initialization of _psycopg
> raised unreported exception
> [2023-12-17 01:40:06] │
> [2023-12-17 01:40:06] │  !     Error while running '$ python manage.py
> collectstatic --noinput'.
> [2023-12-17 01:40:06] │        See traceback above for details.
> [2023-12-17 01:40:06] │
> [2023-12-17 01:40:06] │        You may need to update application code to
> resolve this error.
> [2023-12-17 01:40:06] │        Or, you can disable collectstatic for this
> application:
> [2023-12-17 01:40:06] │
> [2023-12-17 01:40:06] │           $ heroku config:set
> DISABLE_COLLECTSTATIC=1
> [2023-12-17 01:40:06] │
> [2023-12-17 01:40:06] │
> https://devcenter.heroku.com/articles/django-assets
> [2023-12-17 01:40:06] │ ERROR: failed to build: exit status 1
> [2023-12-17 01:40:07] │
> [2023-12-17 01:40:07] │
> [2023-12-17 01:40:07] │ For documentation on the buildpacks used to build
> your app, please see:
> [2023-12-17 01:40:07] │
> [2023-12-17 01:40:07] │    Python  v3.235.4
> https://do.co/apps-buildpack-python
> [2023-12-17 01:40:07] │
> [2023-12-17 01:40:07] │  ✘ build failed


Best regards,
~Ram

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2BOi5F17RSXJ3G4vt9c94S1JtP4anY1P7QS2cOG7LkyjrpAisw%40mail.gmail.com.

Reply via email to