648 questions
1
vote
0
answers
24
views
Docker container name remains recognized host/server name when using ProxyFix for Flask behind Nginx
I have Nginx running in a docker container on the same network as my Flask app. I set up a reverse proxy in Nginx for my Flask app (running on gunicorn), and then setup ProxyFix to reset the Flask ...
0
votes
1
answer
64
views
Werkzeug BaseWSGIServer Thread Hangs after Handling Request. Terminal Unresponsive
This has stopped me from doing anything useful for more than a week - if you have experience with Python/Werkzeug/Flask/Multi-threading, please help...
Now, normally, you would run a Flask app in a ...
0
votes
1
answer
33
views
Not able to upgrade Werkzeug through my Dockerfile
I'm trying to update the werkzeug (py3-werkzeug-2.2.2-r1) to 3.0.6, through my Dockerfile but couldn't and getting this error
#7 [ 3/14] RUN apk add --no-cache git=2.39.5-r0 py3-werkzeug=3.0.6-r0
#7 0....
0
votes
1
answer
78
views
remove bash colors when logging to file in flask
I'm trying to modify the flask request formater so I get some logs on the console but I want the logs in my file to be colorless since those basically add ANSI characters that make the log reading ...
1
vote
1
answer
104
views
How to get server's IP and port from Flask Python code
I have a very simple Flask app (from https://flask.palletsprojects.com/en/stable/quickstart/)
# File name: app.py
from flask import Flask
app = Flask(__name__)
@app.route("/")
def ...
0
votes
0
answers
311
views
What are the downsides for using Werkzeug with Flask for production with the flag `allow_unsafe_werkzeug=True`
I have written a script in Python using Flask for displaying my Raspberry Pi camera feed on a webpage and when I try and serve it for use on the Pi I get a crash with the error RuntimeError: The ...
0
votes
0
answers
104
views
Latest version of Flask will not run
flask run ends with the error ImportError: cannot import name '_request_ctx_stack' from 'flask'
Common question it seems, but I cannot find a straight answer for any recent versions of Flask. At ...
-1
votes
1
answer
119
views
Issue between Werkzeug (dependency of Flask) and Vercel when trying to build webapp
I'm trying to deploy a Flask app using Vercel and I'm getting an error during the build that reads as follows:
[Error: ENOENT: no such file or directory, lstat '/vercel/path0/werkzeug/__pycache__/...
0
votes
0
answers
45
views
werkzeug Local got unexpected value
I may have a misunderstood with werkzeug.local
Here is my simplified test code:
from flask import Flask, request
from werkzeug.local import Local
import threading
app = Flask(__name__)
local_data = ...
0
votes
2
answers
221
views
Flask: How to fix Build Error when building URL endpoint
I am trying to run my Flask app which was previously working, although now throws the error
werkzeug.routing.exceptions.BuildError: Could not build url for endpoint 'dataVis'. Did you mean 'static' ...
0
votes
0
answers
72
views
How to disable Flask/Werkzeug logs using socketio
I cannot in any way disable the Flask/Werkzeug logs. I am developing a site for a board game and when the lobby starts all the clients request the images of the cards at the same time. I think ...
0
votes
1
answer
186
views
How to get image from odoo12 for external web
I want to get image from Odoo to external web. I tried get any url from controller of odoo but it did not work.
I am using Odoo12 as the web backend for setting values, and there is an external ...
1
vote
1
answer
50
views
twisted klein CORS headers not easy to see how to capture preflight OPTIONS call in KLEIN
When Changing from twisted.web to KLEIN for a project, I have run into the problem where I need to deal with the browser preflight request and handle the CORS headers.
But I cannot find any solid ...
0
votes
1
answer
2k
views
AttributeError: module 'typing' has no attribute 'Literal'
I have python 3.9 installed in my windows machine with a flask script working as expected. Then I tried to replicate the environment on my linux machine. I have the same python version and the exact ...
4
votes
3
answers
2k
views
413 REQUEST ENTITY TOO LARGE flask werkzeug gunicorn MAX_CONTENT_LENGTH
I am using flask in combination with werkzeug and gunicorn.
I am running Gunicorn with the following command:
gunicorn --log-level debug --timeout 300 --limit-request-line 0 --limit-request-field_size ...