55,185 questions
0
votes
1
answer
50
views
Appropriate method to pass arguments in Flask without using the url
I am using flask and a deep learning model in tensorflow to display some annotated video. The module works fine but the loading of the model is lazy due to the nature of the generator. Only after I ...
0
votes
0
answers
23
views
Certificate Verification using Blockchain with python ? Struck in the middle [closed]
I couldn't get the public key or public viewing format which is been initialized with bootstrap, I tried modifying my codes with possible AI suggestions nothing worked , out of help
Tasks involved , ...
Best practices
0
votes
4
replies
81
views
Python: two Flask projects under the same HTTP Port
I have 2 separate projects running on the same Linux server. Both projects based on Flask. Due to infrastructure restrictions I'm able to use only one HTTP Port on the server.
I would like to route ...
1
vote
0
answers
38
views
Locust POST Request with .xlsx File to Flask Endpoint Returns a 503 Error
I am testing my Python Flask app using Locust to load-test a POST request with an .xlsx file attachment. However, I consistently encounter a 503 Service Unavailable error.
This issue ONLY occurs when ...
0
votes
0
answers
30
views
Nginx cutting off Flask streaming responses (with Docker) even with buffering disabled
I have a Flask backend running inside Docker, and it streams AI responses using a generator.
Locally it works perfectly, but after deploying with Nginx + Docker Compose, the streamed response gets cut ...
1
vote
0
answers
48
views
React/Axios file upload to Flask-RESTful gives 422 Unprocessable Entity
I'm trying to upload a file from my React frontend to a Flask-RESTful backend and I'm stuck on a 422 (UNPROCESSABLE ENTITY) error.
My backend logs show the POST request hits the right endpoint, but my ...
1
vote
1
answer
59
views
Serving js files from static folder in flask app with nginx and Docker
I have a strange issue with js files that cannot be found in a flask app, for which I use nginx in a docker container.
In the HTML template, I have this ref, using the url_for function
<script type=...
0
votes
0
answers
31
views
I my flask app data store as json file when we refresh the page then all admin page data will disappear but store in the database fix this problem?
Frontend not connected to backend saving API
The “Save Application” buttons (like saveRegularApplication()) only push data into a JS array applications[] — they never send it to the backend /save-...
0
votes
0
answers
60
views
Intermittent ESC/POS Printer Issue Using Flask + Gunicorn on Raspberry Pi
I originally had a Raspberry Pi running Raspberry Pi OS (Full Desktop) with Apache serving a Flask app on port 80:
from flask import Flask, request
from escpos.printer import Usb
app = Flask(__name__)...
0
votes
1
answer
91
views
javascript fetch and redirect through flask view not working as expected
In the html intro to a web app for a scientific study, data is collected through forms.
I added a javascript function that submits the data via the fetch API:
fetch('/prepare/', {
"method":...
1
vote
0
answers
74
views
LinkedIn API: “ACCESS_DENIED - Field Value validation failed in REQUEST_BODY: Data Processing Exception while processing fields [/author]
I'm trying to post a job description to LinkedIn using their ugcPosts API through my Flask backend.
I’ve successfully obtained a 3-legged OAuth 2.0 access token with w_member_social scope.
Token works ...
0
votes
1
answer
67
views
Does flask dev server normalize paths?
I was playing a CTF which was about path traversal. The server code was like below:
import flask
import os
app = flask.Flask(__name__)
@app.route("/docs/<path:path>", methods=["...
1
vote
1
answer
37
views
Confused with simple print() logging in Flask and Gunicorn
Historically, i usually run all of my Flask/Gunicorn apps with the following command in my dockerfile:
CMD ["gunicorn", "app.wsgi:app", "--config", "app/...
0
votes
1
answer
39
views
How do I turn on logs when using Gevent with Gunicorn?
I used to use eventlet to run a flask app on Render.com. It would show detailed logs on render every time an HTTP request was made like GET /socket.io/?EIO=4&transport=polling&t=PcGtd0M HTTP/1....
1
vote
1
answer
77
views
Flask not redirecting to Dashboard after login
I am using flask as the backend for my project. I created a login form with html and a route in flask. I am using Mysql as the database. When I fill in the form and click log in, the page is just ...
0
votes
0
answers
70
views
How to load environment variables in PythonAnywhere?
I have just finished working on a Flask web application that is using openai SDK.
Locally everything works smoothly, but after uploading the project on PythonAnywhere, the environment variables from ....
1
vote
0
answers
59
views
Python Flask app connected to Cassandra Astra DB RAM memory issue
I'm running a minimal Python Flask app with one API endpoint which make a simple call to retrieve data from the a Cassandra Datastax DB inside a for loop.
# Day-2-Day Power
@app.route("/d2d_new_2/...
1
vote
1
answer
60
views
Flask SQL model missing one positional argument
from flask import (Flask, render_template)
from flask_sqlalchemy import SQLAlchemy
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://user:password@localhost/database'
db = ...
0
votes
1
answer
53
views
Stream response with Python and Flask
I was having some issues with my Flask app when some requests ended up using too much memory to send a response with all the data in just one go, reading the flask docs it says i can stream the ...
0
votes
1
answer
78
views
Using pybabel to translate tooltip text inside a HTML tag
I've basically finished translating my flask frontend into a lot of different languages but there are a couple of tooltips that I just can't seem to figure out. Technically, these need to be strings ...
1
vote
1
answer
86
views
URL getting rewritten when using Kubernetes ingress alongside Flask
I want to access two services with my Kubernetes ingress, and both services are based upon a Flask app. Each Flask app is made of a main.py script and a index.html web page, which is rendered using ...
0
votes
1
answer
85
views
Debugging Flask in Cursor Git Worktree Environment with Poetry Not Working
Interesting pre data:
I had no problem debugging in cursor before I created a git worktree of my repo
Issue Details:
After creating a git worktree I now how a separate .venv in both worktrees
I ...
2
votes
2
answers
59
views
SyntaxError in flask_humanify
I get this Syntax error after installing flast_humanify
Traceback (most recent call last):
File "once.py", line 29, in <module>
from flask_humanify import Humanify
File "/...
1
vote
0
answers
104
views
Receive Error 400: redirect_uri_mismatch when trying to use OAuth
I am using Render.com to deploy online a flask app. I want it to first login using Google OAuth before accessing the website. However, I must be doing something wrong because it does pull up the "...
0
votes
0
answers
78
views
Starting server to get Cesium terrain height only works one time
I have multiple datasets with coordinates in them and I want to plot these points in Cesium for Unreal. For me to do that, I need to correct terrain heights and I want to have them in Python (since I'...