-
-
Notifications
You must be signed in to change notification settings - Fork 608
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
ImportError: No module named flask #169
Comments
@tiangolo this issue got resolved but when i try to deploy in mesos, i see below error and in Docker file - i have exposed port 8520 and in main.py file , have used port 5100. Let me know - what could be the issue ? *** Starting uWSGI 2.0.17 (64bit) on [Sat Mar 14 23:54:15 2020] *** |
It seems like something where you are deploying that is trying to use the port But that's actually not related to this Docker image but to your infrastructure and where you are starting the container. |
thanks @tiangolo , actually i added "RUN unset -v PYTHONPATH" in docker file after that it started working. |
i have created an app using this code [https://github.com/tiangolo/uwsgi-nginx-flask-docker/tree/356fb1c49b62ac195620901a22d1ac62082bdf74/python2.7-alpine3.8]. when i execute the docker container from my local machine, its working fine. but when deploy to mesos then i noticed couple of things:
*** Operational MODE: preforking ***
Traceback (most recent call last):
File "./main.py", line 3, in
from flask import Flask
ImportError: No module named flask
unable to load app 0 (mountpoint='') (callable not found or import error)
*** no app loaded. GAME OVER ***
more log:
;uWSGI instance configuration
[uwsgi]
cheaper = 2
processes = 16
ini = /app/uwsgi.ini
module = main
callable = app
master = true
chmod-socket = 660
vacuum = true
die-on-term = true
ini = /etc/uwsgi/uwsgi.ini
socket = /tmp/uwsgi.sock
chown-socket = nginx:nginx
chmod-socket = 664
hook-master-start = unix_signal:15 gracefully_kill_them_all
need-app = true
die-on-term = true
plugin = python
show-config = true
;end of configuration
*** Starting uWSGI 2.0.17 (64bit) on [Thu Mar 12 00:52:25 2020] ***
compiled with version: 6.4.0 on 01 May 2018 17:28:25
os: Linux-4.4.0-1072-aws #82-Ubuntu SMP Fri Nov 2 15:00:21 UTC 2018
nodename: 2172e0780eb1
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 8
current working directory: /app
detected binary path: /usr/sbin/uwsgi
your memory page size is 4096 bytes
detected max file descriptor number: 1048576
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uwsgi socket 0 bound to UNIX address /tmp/uwsgi.sock fd 3
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
Python version: 2.7.15 (default, Jul 22 2019, 09:39:07) [GCC 6.4.0]
*** Python threads support is disabled. You can enable it with --enable-threads ***
Python main interpreter initialized at 0x7fe159b49820
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 1239640 bytes (1210 KB) for 16 cores
@tiangolo could you please help me, what could be the issue ?
The text was updated successfully, but these errors were encountered: