Why am I getting 404 error in Flask?
You're calling app.run()
before registering your handler. You should move the whole if __name__ == '__main__'
block to the bottom of the script.
For me the problem was that I executed send_from_directory
with wrong path to file inside my view function