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

gentry error #1

Open
youngd24 opened this issue Sep 10, 2021 · 0 comments
Open

gentry error #1

youngd24 opened this issue Sep 10, 2021 · 0 comments

Comments

@youngd24
Copy link

Getting the following:

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

[Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/gunicorn/workers/ggevent.py", line 13, in <module>
import gevent
ModuleNotFoundError: No module named 'gevent'

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/gunicorn/util.py", line 99, in load_class
mod = importlib.import_module('.'.join(components))
File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 843, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/usr/local/lib/python3.8/site-packages/gunicorn/workers/ggevent.py", line 15, in <module>
raise RuntimeError("gevent worker requires gevent 1.4 or higher")
RuntimeError: gevent worker requires gevent 1.4 or higher
]

Changed Dockerfile to:

FROM python:3.8
RUN apt update
RUN pip3 install flask
RUN pip3 install gevent
RUN pip3 install gunicorn
RUN pip3 install gunicorn
COPY ./main.py /home/main.py
WORKDIR /home
CMD gunicorn --keep-alive 10 -k gevent --bind 0.0.0.0:5000 -w 20 main:app

Works now

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