I just dont get this test here running

andreas-wegundTRIAL

6 months ago

Dear Railway team,

I just try today to upload a Django App for the first time.
As I neven did that before I simply try to follow along to finally get my test-gh-repo up and running with a PostgresDB in the back.

The PostgreSQL DB seems to work just fine, but for some reason the Django App in the Github repo just wount work and the deploy logs just say nothing to me .

If you can help me to get this up and running - so that I know how to do it in the future - I would be more than gratefull!
It is only important for me to know it works so that I can get myself a paid account that is worth the money.

THANK YOU!
Andreas

View Deploy details

ⓘ Deployment information is only viewable by project members and Railway employees.

3 Replies

6 months ago

The deploy logs say a lot -

[2024-12-18 21:49:35 +0000] [4] [ERROR] Exception in worker process

Traceback (most recent call last):

  File "/opt/venv/lib/python3.12/site-packages/gunicorn/arbiter.py", line 608, in spawn_worker

    worker.init_process()

  File "/opt/venv/lib/python3.12/site-packages/gunicorn/workers/base.py", line 135, in init_process

    self.load_wsgi()

  File "/opt/venv/lib/python3.12/site-packages/gunicorn/workers/base.py", line 147, in load_wsgi

    self.wsgi = self.app.wsgi()

                ^^^^^^^^^^^^^^^

  File "/opt/venv/lib/python3.12/site-packages/gunicorn/app/base.py", line 66, in wsgi

    self.callable = self.load()

                    ^^^^^^^^^^^

  File "/opt/venv/lib/python3.12/site-packages/gunicorn/app/wsgiapp.py", line 57, in load

    return self.load_wsgiapp()

           ^^^^^^^^^^^^^^^^^^^

  File "/opt/venv/lib/python3.12/site-packages/gunicorn/app/wsgiapp.py", line 47, in load_wsgiapp

    return util.import_app(self.app_uri)

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/opt/venv/lib/python3.12/site-packages/gunicorn/util.py", line 370, in import_app

    mod = importlib.import_module(module)

          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/root/.nix-profile/lib/python3.12/importlib/__init__.py", line 90, in import_module

    return _bootstrap._gcd_import(name[level:], package, level)

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import

  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load

  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked

  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked

  File "<frozen importlib._bootstrap_external>", line 995, in exec_module

  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed

  File "/app/Portolio/wsgi.py", line 29, in <module>

    application = get_wsgi_application()

                  ^^^^^^^^^^^^^^^^^^^^^^

  File "/opt/venv/lib/python3.12/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application

    django.setup(set_prefix=False)

  File "/opt/venv/lib/python3.12/site-packages/django/__init__.py", line 19, in setup

    configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)

                      ^^^^^^^^^^^^^^^^^^^^^^^

  File "/opt/venv/lib/python3.12/site-packages/django/conf/__init__.py", line 81, in __getattr__

    self._setup(name)

  File "/opt/venv/lib/python3.12/site-packages/django/conf/__init__.py", line 61, in _setup

    raise ImproperlyConfigured(

django.core.exceptions.ImproperlyConfigured: Requested setting LOGGING_CONFIG, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.

andreas-wegundTRIAL

6 months ago

OK, happy to hear that you understand this!

Locally I have the settings.py file in the project so that it works just fine...

Should I add this "define the environment variable DJANGO_SETTINGS_MODULE" variable in the Deployment Variables??


andreas-wegundTRIAL

6 months ago

Is working and closed - for some reason I was missing some env-vars Thanks


I just dont get this test here running - Railway Help Station