docker-curriculum icon indicating copy to clipboard operation
docker-curriculum copied to clipboard

trying to do your flask tutorial

Open gswscreagle opened this issue 3 years ago • 3 comments

was trying to do your flask tutorial and it's not working for me...not sure why. This is what I was getting when trying to fire it up

gwilliams@alice:~/src/docker-curriculum/flask-app$ sudo docker run -p 8888:5000 gswscreagle/catnip Traceback (most recent call last): File "/usr/src/app/./app.py", line 1, in from flask import Flask, render_template File "/usr/local/lib/python3.10/site-packages/flask/init.py", line 21, in from .app import Flask, Request, Response File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 34, in from .sessions import SecureCookieSessionInterface File "/usr/local/lib/python3.10/site-packages/flask/sessions.py", line 14, in from collections import MutableMapping ImportError: cannot import name 'MutableMapping' from 'collections' (/usr/local/lib/python3.10/collections/init.py)

my email address is [email protected]

gswscreagle avatar Oct 15 '21 00:10 gswscreagle

Hello, just change python version on your Dockerfile. FROM python:3.9 worked fine for me)

blessed2142 avatar Oct 31 '21 17:10 blessed2142

you can change requirements.txt to

Flask==2.0
itsdangerous==2.0.1

demndevel avatar Mar 08 '22 12:03 demndevel

Fixed in https://github.com/prakhar1989/docker-curriculum/pull/313

prakhar1989 avatar Apr 10 '22 18:04 prakhar1989