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

issue in __init__.py #44

Open
Nefilime opened this issue Feb 19, 2021 · 2 comments
Open

issue in __init__.py #44

Nefilime opened this issue Feb 19, 2021 · 2 comments

Comments

@Nefilime
Copy link

Nefilime commented Feb 19, 2021

I build image via dockerfile

When container start i see error in container.

Traceback (most recent call last):
File "./hello_app/init.py", line 1, in
from flask import Flask # Import the Flask class
ModuleNotFoundError: No module named 'flask'
unable to load app 0 (mountpoint='') (callable not found or import error)
*** no app loaded. GAME OVER ***

@chinghwayu
Copy link

I know this is a year late but I just ran into this and resolved by changing the base image (which doesn't include flask) to:

tiangolo/uwsgi-nginx-flask:python3.8-alpine-2020-12-19

FROM tiangolo/uwsgi-nginx:python3.8-alpine-2020-12-19

@yorkzhang
Copy link

yorkzhang commented Jul 6, 2022

The issue seems happen again even "tiangolo/uwsgi-nginx-flask:python3.8-alpine-2020-12-19" is already changed to. It looks like the new image from Dockerhub was not built properly so Flask is not installed in.
An easy way is just uncommenting below lines in Dockerfile:
#COPY requirements.txt /
#RUN pip install --no-cache-dir -U pip
#RUN pip install --no-cache-dir -r /requirements.txt

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

3 participants