Category "flask"

Unable to return json values retrieved from MongoDB to HTML page in python flask

I'm able to retrieve required value from MongoDB individually and also able to print same values but unable to return all those values to HTML page. When I try

I get jwt.exceptions.DecodeError: Invalid header padding

So I have a simple flask app. Logging in creates a token: token = jwt.encode({'user': token_data}, app.config['SECRET_KEY']).decode('utf-8') The middleware loo

flask test_client returns 404 for valid url

I've been writing an API and I want to test it. Get requests to API by requests are working well but when I want to test by test_client I have always received

Static files not found Flask on Apache

I have a Flask application deployed on Apache, and the JavaScript files in the static folder cannot be found I don't understand what is wrong, here are the f

Messenger bot send a message every 5th message

I am making a simple bot for messenger on python using fbmq, that handles quick questions. I made bot to send a message when users text to my Facebook page ou

Connecting data to the marker in folium

so I wanted to link up the data table that I have with the marker present on the map. I used folium to create a map with markers and pop-ups. For example, if I

Remove specific part of a value in flask cache after certain time

I am dealing with a use case where in i want to delete certain part of a key's value I am using Cache from flask_caching reference - https://flask-caching.readt

Challenge value not responding when connecting to request URL using python

I am trying to connect to my request URL in slack but it does not respond with the challenge value like it is supposed to. This has never been an issue before a

Flask serve react app build without interfering with Flask-socket.io requests

Im attempting to serve a react app via flask using the catch-all found in the top answer of this question, which works great for serving all of the build files,

AttributeError: module 'sqlalchemy' has no attribute 'NullType'

I am trying to configure flask SQLAlchemy with MySQLWorkBench, The following command works good: flask db migrate -m'Config' But when I try to execute flask db

Why do I lose bootstrap styling when passing variables through URL in Flask?

When I pass a variable in Flask my Bootstrap styling doesn't work. If I use a normal app route without the variable the styling works. The relevant code is as f

How to parse a multipart form-data that contains both files and normal fields in webargs?

I need to parse a multipart form-data with attached file using webargs. At this moment I have the next model: RAW_ARGS = { 'file': fields.Field(

Password Validation Not Working For Flask Form

I'm trying to implement a form where I want a message to be shown in advance if passwords don't match. I have added a data required validator but password match

Crash app error while trying to deploy react-flask app on heroku

I'm currently getting this error when I run the heroku logs --tail command. at=error code=H10 desc="App crashed" method=GET path="/" host=digital-engagement-too

I'm Getting Ngrok Error 6022 after doing everything properly

You can refer to my images for details. This is the code I'm running on colab: from google.colab import drive drive.mount('/content/drive') cd /content/drive/M

chrome fails to load SOME scripts & stylesheets with ERR_INVALID_HTTP_RESPONSE (for a flask app on linux (debian))

I have a flask app running on Linux and working correctly under firefox. For chrome, it only works if the cache is disabled!? But i want my website to work corr

Using Tailwind3 in Flask application without manually (re-)generating css

I'm currently trying to set up a flask project using tailwindcss 3.0.23. For templating I'm using jinja. Furthermore yarn is used. During previous projects when

RuntimeError: The session is unavailable because no secret key was set. Set the secret_key on the application to something unique and secret

I am making Flask app. I wrote this code: from flask import Flask, session from flask_caching import Cache app = Flask(__name__) cache = Cache(app, config={'CA

Redirect to previous URL after OAuth login is completed (flask-dance)

I am developing a Flask application that allows the user to login using OAuth (with Github as a provider), and the flask-dance library. For some reason I am not

How do I update Python variables in txt in real time?

I have the code below who does the work, it writes to my txt file but it will take only the last http request. The counter seems not to work, but when I use glo