How to stop flask application without using ctrl-c

I want to implement a command which can stop flask application by using flask-script. I have searched the solution for a while. Because the framework doesn't provide "app.stop()" API, I am curious...

I'm not able to import Flask-WTF TextField and BooleanField

I'm using virtualenv to set up a new project. I installed a lot of things using virtualenv pip from the script folder like below: flask\scripts\pip install Flask-WTF I have no other packages...

Flask - ImportError: No module named migrate.versioning

I'm working through a flask tutorial and am trying to run a script that creates a database instead of doing it through the command line. It uses the SQLAlchemy-migrate package, but when I try to...

AJAX Load not working Error occured: 404 error

This is my code and I'm trying to load html from demo_test.txt into it, but it won't work no matter what I try. I've tried changing it from txt to html as well and it still won't load. The other...

Gunicorn Flask Caching

I have a Flask application that is running using gunicorn and nginx. But if I change the value in the db, the application fails to update in the browser under some conditions. I have a flask...

Are a WSGI server and HTTP server required to serve a Flask app?

Setting up Flask with uWSGI and Nginx can be difficult. I tried following this DigitalOcean tutorial and still had trouble. Even with buildout scripts it takes time, and I need to write...

flask python list to javascript

I am using python flask temple to build a site. I have a case where I want to send a python list to a java script. The python list contains three objects however when I do list1.length in the java...

Bridging a Python back-end and JavaScript front-end

I'm currently working on a project that involves parsing through a user-supplied file, doing computations with that data, and visualizing the results using graphing utilities. Right now, I'm stuck...

Flask TypeError 'is not JSON serializable' - nested dictionary

i am using Flask as framework for my server, and while returning a response i get the following error: > Traceback (most recent call last): File "C:\Python27\lib\site-packages\flask\app.py",...

Bootstrap navbar not working in Flask

I am working through a Flask tutorial but I can't make the Bootstrap navbar work. I think I have all my code as the tutorial specified and my folder tree is as it should be. My app.py: from flask...

Flask, wfastcgi, and IIS on Windows Server 2012

I am trying to deploy a flask service on IIS on Windows Server 2012. To arrive at this point: pip installed flask (Python versions 2.7 and 3 were already installed.) pip installed wfastcgi Ran...

ImportError: No module named 'flask_jwt_extended' in PYTHON FLASK

in localhost:5000 the script is running without any errors. but when it comes to symlink an error has been thrown to appache log. [Sun Jun 10 17:07:16.170057 2018] [wsgi:error] [pid 30438] [client...

Trying to deploy a Flask app on CherryPy server

I was trying to deploy my Flask app on CherryPy server. I liked its simplistic and minimalistic nature. So I PIP'ed CherryPy like below pip install CherryPy-15.0.0-py2.py3-none-any.whl and...

How to receive values from a AJAX GET call in flask restful?

I am running a flask restful API, for weather prediction, flask_rest.py and a web app to consume the API named main.py. I am trying to display the output using AJAX in a HTML file named...

Flask app hosted on Heroku shows Bokeh plot on my computer but not on any other computer

I'm new to Flask and hosting apps on Heroku. I have written a fairly simple Flask App, and when I host it on Heroku and go to the app URL it displays the Bokeh plot correctly on my computer....

AttributeError: Word.Application.Documents with win32.com in a Flask application

I am developing a web application that takes a word file and performs tokenization. I noticed that the document is passed correctly from angularJS to Flask, but there is an error that I can't...

CRITICAL WORKER TIMEOUT on gunicorn when deployed to AWS

I have a flask web-app that uses a gunicorn server and I have used the gevent worker class as that previously helped me not get [CRITICAL] WORKER TIMEOUT issues before but since I have deployed it...

Login and upload file using Python 'flask' app

I Have created a flask app which need to upload files to server and also need to take login detail on same html form . I am able to upload file to destination folder , but credential part is not...

Flask Audio File to Wave Object Python

I want to convert an audio file received from flask api (of type class 'werkzeug.datastructures.FileStorage') to a Wave (https://pypi.org/project/Wave/) object. Usually, you do this by supplying a...

How to add Plotly graph config when converting to json through Flask / not using plt.show()

I have seen similar questions up before without answer. The aim is to show the image on the Flask application but with the altered config. How is the config setting on Plotly charts altered when...

Multiple chart on one page using chart.js and Flask app

I am trying to get multiple charts on one web page with different value. I can get two charts, but displays same data. Can someone please help me what i am missing? Below is App.py where I am...

Redash Docker installation problem: sqlalchemy.exc.OperationalError: (psycopg2.OperationalError)

I'm trying to install Redash on Ubuntu 20.04.1 I used this method of installing: https://github.com/getredash/setup I downloaded the files I cd in to the folder I run 'sudo ./setup.sh' I get the...

cannot run pyinstaller executable of a flask server. ValueError: Can't find a dictionary for language 'ru'

I'm trying to put a simple flask server into executable by using pyinstaller -F server.py command When running the exe file, I obtain the following error: Traceback (most recent call last): File...

Plotly Dash and callbacks that invoke multiprocessing code

I recently started putting together a webapp with Plotly Dash. I have a callback function that updates a DataTable with data that are fetched from a Redis server. The code that connects to Redis...

Vscode Flask hot-reload

Using VisualStudio code, created a virtual environment with anaconda, and spun up a simple flask app. Everything is working, but I want to be able to see the changes I make when refreshing the...

Migrate "Manager" from Flask-Script to Flask CLI

I'm not quite sure how to migrate this simple old Flask-Script manage.py to the CLI provided in Flask 0.11+ from flask_script import Manager from flask_migrate import Migrate, MigrateCommand from...

Flask-Script: from flask._compat import text_type ModuleNotFoundError: No module named 'flask._compat'

When using Flask-Script I get an error when importing Manager. I have installed with pip Flask and Flask-Script. How do I fix this? manage.py from flask_script import Manager from main import...

Flask Socketio | Update and plot a chart using background tasks created by Flask Executor or ThreadPoolExecutor

I am currently trying to successfully plot a bar chart when the results from the dataframe is updated or when there is any change in the...

ModuleNotFoundError: No module named 'zeep'

I have created a virtual environment on which I ran the following command to install Zeep (I am on macOS Big Sur): pip3 install zeep To verify if I have correctly installed it I ran: pip3...

Selenium + Flask/Falcon in Python - 502 Bad Gateway Error

I'm using selenium to make a headless scraping of a website within an endpoint of an API using Flask for Python. I made several tests and my selenium scraping code works perfectly within a script...