Skip to content

Chapter 3 manning-airflow/events_api Docker image problem #66

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

Open
vasilypu opened this issue Aug 19, 2022 · 3 comments
Open

Chapter 3 manning-airflow/events_api Docker image problem #66

vasilypu opened this issue Aug 19, 2022 · 3 comments

Comments

@vasilypu
Copy link

Traceback (most recent call last):
File "/app.py", line 8, in
from flask import Flask, jsonify, request
File "/usr/local/lib/python3.8/site-packages/flask/init.py", line 14, in
from jinja2 import escape
ImportError: cannot import name 'escape' from 'jinja2' (/usr/local/lib/python3.8/site-packages/jinja2/init.py)

@scndel
Copy link

scndel commented Aug 27, 2022

Fixed in #61

@vasilypu
Copy link
Author

I know how to fix it
but docker image and github code still old
in requirementa.txt
flask==1.1.2

@vasilypu
Copy link
Author

vasilypu commented Jan 17, 2024

error:
2024-01-17 18:34:53 ImportError: cannot import name 'url_quote' from 'werkzeug.urls' (/usr/local/lib/python3.8/site-packages/werkzeug/urls.py)

Fixed by modifying Dockerfile in docker/events-api:

FROM python:3.8-slim

COPY requirements.txt /tmp/requirements.txt
RUN pip install -r /tmp/requirements.txt && rm -f /tmp/requirements.txt
RUN pip uninstall -y Werkzeug && pip install Werkzeug==2.3.6

COPY app.py /

EXPOSE 5000

ENTRYPOINT ["python"]
CMD ["/app.py"]

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

2 participants