Flask view return error “View function did not return a response”

The following does not return a response:

@app.route('/hello', methods=['GET', 'POST'])
def hello():
    hello_world()

You mean to say…

@app.route('/hello', methods=['GET', 'POST'])
def hello():
    return hello_world()

Note the addition of return in this fixed function.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)