-
Notifications
You must be signed in to change notification settings - Fork 4
errors
Bad Request: The browser (or proxy) sent a request that this server could not understand.
If you see this error message, what this usually means is that you tried to use a variable in your Python code that should have been sent via an HTML form, but wasn't. Check for mis-namings between your HTML form variables and your Python variables. To help you debug, you can put print(request.form) at the top of any Python function.
Make sure your templates folder is inside the folder for your application. In other words,
inside of flask-apps, you probably have a folder with the name of your application, such as
first, where your .py file lives. Your templates folder should be inside of first.
You ran flask run from the wrong directory/folder. You should run this command from the
folder where your Flask application (python code) lives.
To fix this, do cd name-of-folder. For instance cd flask-apps/first.
You run flask run when it was already running. To stop the currently-running version, type pkill -9 flask.
Use the main wiki page to navigate, not the list of pages directly above, because those are out of order.