Giter Site home page Giter Site logo

Comments (8)

dwolf42 avatar dwolf42 commented on June 28, 2024 19

@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.

jcpayne avatar jcpayne commented on June 28, 2024 2

That's great @dwolf42 , thanks! It works for me too.

from docker-curriculum.

yozsoy avatar yozsoy commented on June 28, 2024 1

@dwolf42 fixed the issue for me

from docker-curriculum.

dwolf42 avatar dwolf42 commented on June 28, 2024

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.

peter-kaagman avatar peter-kaagman commented on June 28, 2024

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.

rgibbins avatar rgibbins commented on June 28, 2024

The following worked for me in the requirements.txt file:

Flask==2.0.2
Werkzeug==2.2.2

from docker-curriculum.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.