Category "flask"

ERR_CONNECTION_REFUSED on browser when opening dtale with Eclipse Pydev

Opening a dtale sheet using Eclipse Pydev on Windows leads to ERR_CONNECTION_REFUSED on browser. The same code works on spyder and jupyter however. I know dtale

Failing to deploy flask tesseract app to heroku

I wanted to deploy my tesseract app to heroku but it is always 'unable to locate package tesseract-ocr' and is unable to deploy it. I was following this tutoria

How to reference a html template from a different directory in python flask

@app.route('/view', methods=['GET', 'POST']) def view_notifications(): posts = get_notifications() return render_template("frontend/src/view_notificatio

Python Flask calling functions using buttons

Once the button in my flask template is pressed I'd like it to call a python function defined in app.py that I made to be available to be called within the temp

Set max number of threads in Flask

I am using Flask as service for requests that execute heavy processing tasks. I want to use multi threading. I made a test and opened 100 threads. I'm afraid th

Error running docker container: starting container process caused "exec: \"python\": executable file not found in $PATH": unknown

I am trying to dockerize a simple Python-Flask application but I am getting an error while running my container. docker: Error response from daemon: OCI runtim

How to validate Fields.Raw in Flask Marshmallow

I'm trying to set up a Webservice that accepts Images via POST methods. I'm using Python Flask as well as Flask-Apispec to create a Swagger documentation. I thu

Meraki API - Redirect stdout, stderr to websocket or file

I'm using a Flask route to call the Meraky python library and trying to redirect the stdout and stderr of each API call to a websocket or eventually a log file,

Unit testing Flask Babel translations

I'd like to do some unit tests to check my flask app translations. I have tried this piece of code: def test_pt_br(self): with app.test_request_context():

python get form data how can this be?

This is my js function for ajax form submit: $('.sendButton').on('click', function(){ $.post( "/send-form", $('#contactForm').serialize()) } This is my f

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

Failed to decode JSON object: Expecting value: line 1 column 1 (char 0)

This question is kind of duplicate but I could not find a solution to it. When I am calling the flask app and passing the JSON data, I am getting the error: "F

Flask cannot import from website create_app

ImportError: cannot import name 'create_app' from 'website' from website import create_app app = create_app() if __name__ == '__main__': app.run(debug=Tr

502 Bad Gateway upstream prematurely closed connection while reading response header from upstream with flask, uWSGI, nginx

how are you? I have a server on DigitalOcean with Ubuntu 16.04 I am making a Flask Application with uWSGI and Nginx. My files look like: wsgi.py: from flaskap

secret key not set in flask session, using the Flask-Session extension

Right now I am using a flask 3rd party library Flask-Session and I am having no luck getting a session working. When I connect to my site, I get the following e

How to change downloading name in Flask?

I'm using Flask's send_file to serve a file at a specific URL. However, the name of the saved file is always the last part of the URL, like download, instead of

Why is the database of the webapp in the book "Head First Python 2nd Edition" not working as it should?

I'm currently studying Python by reading the book "Head First Python 2nd Edition" and it is really helpful and well-written, but I think it is a little anachron

Implementing OpenID with Apache Superset. AttributeError: 'bool' object has no attribute 'is_active'

I am trying to implement OpenID in Apache Superset. I am using Broadcom CA-SSO as my provider. I found a similar post in Stack Overflow where someone implemente

How do I setup files to run multiple flask (nginx, gunicorn) applications on one server? (specify separate ports)

After getting each application to run on their own you need to specify the port in the application, nginx and gunicorn/service files. I am using AWS with Centos

how to view WTForms validation errors?

I am writing some basic tests and have a test failing. def test_new_user_registration(self): self.client.get('/user/register') form = RegistrationForm(