Questions tagged [flask]
Flask is a lightweight framework for developing web applications using Python.
flask
55,739
questions
0
votes
0
answers
11
views
How do I upload an Excel sheet and show its data on the page in a flask application?
models.py
This is where I have defined all the database schemas:
from app import db, login_manager
from flask_login import UserMixin
@login_manager.user_loader
def load_user(user_id):
return User....
0
votes
0
answers
10
views
Total Newbie on Deploying flask on a web hosting (plus security)
As the title suggest, I'm a recently positioned backend developer who unknowingly processed in a different set of field, from backend to project manager kind of position (bluntly, unfortunately, a one ...
0
votes
0
answers
19
views
When apscheduler starts multiple tasks at the same time, Flask SqlAlchemy query will hang
I'll post a reproducible demo code first.
import time
import sqlalchemy as sql
from apscheduler.executors.pool import ProcessPoolExecutor, ThreadPoolExecutor
from apscheduler.schedulers.blocking ...
0
votes
0
answers
11
views
Unable to receive location and temperature using WEATHERAPI in Flask app
I'm trying to create an app to generate the weather at a certain location based on the IP address visiting my site. My function is supposed to get their IP address using ip-api.com and then send that ...
0
votes
0
answers
34
views
Why is an imported variable reevaluated on each request in Flask?
I'm working on a flask app. There is the app.py file which uses an imported variable:
from other_file import rnd
@app.route('/some/path/', methods=['GET'])
def some_func:
return make_response(...
0
votes
0
answers
24
views
PostgreSQL authentication fails on Ubuntu server until postgresql service is restarted
I am running a Flask app with SQLAlchemy, on Ubuntu server with PostgreSQL and Apache2.
SQLAlchemy gave an authentication failed for postgres error. After stopping Apache2, restarting Postgres and ...
-1
votes
1
answer
26
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
1
answer
15
views
Nginx keeps adding the X-Frame-Options header to responses
I created a widget to be shown on websites, it loads the Flask application that is running on AWS ElasticBeanstalk, nginx server. I can't make it work though, because nginx adds the following header ...
0
votes
0
answers
17
views
got Future <Future pending> attached to a different loop : error while running code
I am trying to build a service which runs on a flask server that creates a schedule and runs it continuously to poll data and check results. I'm using apscheduler and AsyncIOS for this. The issue is ...
0
votes
0
answers
28
views
How do I commit data from a flask form (inside of a modal) to an SQL Database?
I'm pretty new to Flask and struggling with transferring data from a form to an SQL Database. The form is within a modal, which works perfectly and will redirect back to the main page once the form is ...
-3
votes
0
answers
35
views
I got this error in my code: return getattr(obj, attribute) jinja2.exceptions.UndefinedError: 'base64' is undefined [closed]
File "/Users/bkalpa/Library/Python/3.9/lib/python/site-packages/flask/app.py", line 1498, in __call__
return self.wsgi_app(environ, start_response)
File "/Users/bkalpa/Library/...
-1
votes
1
answer
26
views
The python Flask script should run on the PC on which the web application page is open
The web page should display data (PC name, domain, login and some others) the PC on which it is open. For me, it displays data even on remote PCs on the network, the PC on which the python Flask ...
0
votes
0
answers
29
views
Python requests.session object termination, within the context of an API?
I've got a flask application, few endpoints, my API just scrapes one site, uses Beautiful Soup with lxml to parse data into JSON objects and returns it.
The target site needs authentication, and ...
0
votes
1
answer
25
views
How to use FileField within WTForms FieldList? Using Flask-WTF for FileField
I have created dynamic fields using WTForms FieldList, macros and Javascript.
Using this code to validate many fields (StringField, SelectField etc) I can add many fields dynamically, and they ...
0
votes
0
answers
11
views
Flask Gunicorn Open AI chatgpt proxy api timeout
I have a flask project, with gunicorn gevent setup to have async workers.
I have a Open AI chat-gpt proxy route which times out on large datasets api calls, more often than if I use same data directly ...