Skip to content
Advertisement

Tag: flask

terminal error: flask run zsh: command not found: flask

I’m using a Mac , the python version is 2.7.10. and I installed flask I try to follow the tutorial of flash on http://flask.pocoo.org/docs/1.0/ the commands: code in flaskblog.py: The error is command not found: flask I also tried an other tutorial. commands: code in one.py the condition __name__ == ‘__name__’: did not pass. I guess the python venv matters.

imaplib “command SELECT illegal in state NONAUTH” error

I’m attempting to create an application to retrieve and analyse emails sent through gmail. I’m using an alteration on the tutorial found here; http://www.voidynullness.net/blog/2013/07/25/gmail-email-with-python-via-imap/ readmail.py When I run this code through the command line the output is as expected, however when ran through a basic flask import the entire thing falls apart. app.py The error I receive is; I’ve made

Flask url_for – incorrect static folder path

I’m trying to add an image to my quiz.html page with Flask using: When I look at the page source, it’s interpreted as: http://127.0.0.1:5000/quiz/static/img/question-mark.png rather than: http://127.0.0.1:5000/static/img/question-mark.png Yet, my .css files and .js files load in quiz.html using the same syntax just fine. How can I get the correct static file path? My current structure is: app.py Answer You don’t

Why are my gunicorn Python/Flask workers exiting from signal term?

I have a Python/Flask web application that I am deploying via Gunicorn in a docker image on Amazon ECS. Everything is going fine, and then suddenly, including the last successful request, I see this in the logs: [2017-03-29 21:49:42 +0000] [14] [DEBUG] GET /heatmap_column/e4c53623-2758-4863-af06-91bd002e0107/ADA [2017-03-29 21:49:43 +0000] [1] [INFO] Handling signal: term [2017-03-29 21:49:43 +0000] [14] [INFO] Worker exiting (pid:

Advertisement