Comments (8)
@jcpayne jcpayne I found a workaround:
- in your docker-curriculum / flask-app there is a file called requirements.txt
- change the Flask version to 3.0.0 and set the Werkzeug version to 3.0.0.
The file looks like this now:
Flask==3.0.0
Werkzeug==3.0.0
- Save and exit.
- again run docker build -t /catnip .
- there will be a red warning about this is a development server which you can ignore.
- type in your browser 127.0.0.1:5000
- enjoy cat gif :)
from docker-curriculum.
That's great @dwolf42 , thanks! It works for me too.
from docker-curriculum.
@dwolf42 fixed the issue for me
from docker-curriculum.
I second this, great tutorial so far, but I also get ImportError: cannot import name 'url_quote' from 'werkzeug.urls' (/usr/local/lib/python3.10/site-packages/werkzeug/urls.py)
when I run the docker file.
As you might see, even changing from python 3.9 in your example to 3.10 doesn't fix the issue.
I run Docker Engine on Ubuntu
Full error:
Traceback (most recent call last): File "/usr/scr/app/./app.py", line 1, in <module> from flask import Flask, render_template File "/usr/local/lib/python3.10/site-packages/flask/__init__.py", line 7, in <module> from .app import Flask as Flask File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 28, in <module> from . import cli File "/usr/local/lib/python3.10/site-packages/flask/cli.py", line 18, in <module> from .helpers import get_debug_flag File "/usr/local/lib/python3.10/site-packages/flask/helpers.py", line 16, in <module> from werkzeug.urls import url_quote ImportError: cannot import name 'url_quote' from 'werkzeug.urls' (/usr/local/lib/python3.10/site-packages/werkzeug/urls.py)
from docker-curriculum.
Alas did not solve the issue for me. Gives me an error:
2.481 ERROR: Could not find a version that satisfies the requirement Werzeug==3.0.0 (from versions: none)
2.482 ERROR: No matching distribution found for Werzeug==3.0.0
Saw a mention of werzeug version 2.2.2, tried that version to, same error.
To bad, really liked the way this tutorial was going
Peter
from docker-curriculum.
The following worked for me in the requirements.txt file:
Flask==2.0.2
Werkzeug==2.2.2
from docker-curriculum.
Related Issues (20)
- [FEATURE] Add additional info for tutorial to setup up AWS elastic beanstalk HOT 2
- [BUG] Docker image doesn't work in AWS EB environment HOT 1
- It is very good.
- Great tutorial
- Thx
- [BUG] incompatibility of site on Firefox.
- ERROR: No matching distribution found for Flask==2.0.2 HOT 1
- Errors in Elastic Beanstalk Step HOT 1
- ModuleNotFoundError: No module named 'markupsafe'
- Elastic Beanstalk step needs a line to select architecture arm64 HOT 1
- Update tutorial to take account of AWS security changes
- [FEATURE] Extend section Dockerfile
- docker-curriculum.com tutorial does not work HOT 4
- [BUG] Dockerfile section of tutorial
- [BUG] "ImportError: cannot import name 'url_quote' from 'werkzeug.urls'" HOT 3
- Command not working on Windows HOT 2
- Need to update requirements.txt
- werkzeug.urls Error when following along with the "Webapps with Docker" part of the Tutorial
- Werkzeug version ImportError HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-curriculum.