Chat Room
boogeyman0929
FREEOP

7 months ago

Im facing issues which im not really sure of.

https://github.com/boogeyman0929/chat-backend/tree/main

DEPLOYMENT LOGS DOWN

ModuleNotFoundError: No module named 'distutils'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

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

mod = importlib.import_module('.'.join(components))

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

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 gcdimport

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

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

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

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

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

File "/opt/venv/lib/python3.12/site-packages/gunicorn/workers/geventlet.py", line 12, in <module>

raise RuntimeError("eventlet worker requires eventlet 0.24.1 or higher")

RuntimeError: eventlet worker requires eventlet 0.24.1 or higher

]

Error: class uri 'eventlet' invalid or not found:

[Traceback (most recent call last):

File "/opt/venv/lib/python3.12/site-packages/gunicorn/workers/geventlet.py", line 10, in <module>

import eventlet

File "/opt/venv/lib/python3.12/site-packages/eventlet/__init__.py", line 17, in <module>

from eventlet import convenience

File "/opt/venv/lib/python3.12/site-packages/eventlet/convenience.py", line 4, in <module>

from eventlet import greenpool

File "/opt/venv/lib/python3.12/site-packages/eventlet/greenpool.py", line 4, in <module>

from eventlet import queue

File "/opt/venv/lib/python3.12/site-packages/eventlet/queue.py", line 49, in <module>

from eventlet.event import Event

File "/opt/venv/lib/python3.12/site-packages/eventlet/event.py", line 3, in <module>

from eventlet import hubs

File "/opt/venv/lib/python3.12/site-packages/eventlet/hubs/__init__.py", line 7, in <module>

from eventlet.support import greenlets as greenlet

File "/opt/venv/lib/python3.12/site-packages/eventlet/support/__init__.py", line 6, in <module>

from eventlet.support import greenlets

File "/opt/venv/lib/python3.12/site-packages/eventlet/support/greenlets.py", line 1, in <module>

import distutils.version

ModuleNotFoundError: No module named 'distutils'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

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

mod = importlib.import_module('.'.join(components))

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

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 gcdimport

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

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

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

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

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

File "/opt/venv/lib/python3.12/site-packages/gunicorn/workers/geventlet.py", line 12, in <module>

raise RuntimeError("eventlet worker requires eventlet 0.24.1 or higher")

RuntimeError: eventlet worker requires eventlet 0.24.1 or higher

]

$10 Bounty

2 Replies

Railway
BOT

7 months ago

Hey there! We've found the following might help you get unblocked faster:

If you find the answer from one of these, please let us know by solving the thread!


7 months ago

Hey man !

Default python environment doesn't automatically includes all your dependencies. You nee to create a nixpacks.toml file at the root of your repo and define your aditionnal pip packages inside.

# nixpacks.toml

[phases.setup]
nixPkgs = ['distutils', '...some other dependencies']

You can find the official documentation here : https://nixpacks.com/docs/configuration/file


Loading...