Strange frame error caused by incorrect use of flash. Redirect (‘/ path’) in flash

How is 618 sales champion made?Uncover the secret of e-commerce’s “invigorating” hundreds of millions of sales data>>>

I use the following code in the location of the home page:

import flask
@page_index.route('/')
def index():
    flask.redirect('/pythoncgi/')

Results the site has the following errors:

[11/Nov/2019 15:03:01] "GET/HTTP/1.1" 500 -
Traceback (most recent call last):
  File "/usr/local/lib64/python3.6/site-packages/flask/app.py", line 2463, in __call__
    return self.wsgi_app(environ, start_response)
  File "/usr/local/lib64/python3.6/site-packages/flask/app.py", line 2449, in wsgi_app
    response = self.handle_exception(e)
  File "/usr/local/lib64/python3.6/site-packages/flask/app.py", line 1866, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib64/python3.6/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/usr/local/lib64/python3.6/site-packages/flask/app.py", line 2446, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib64/python3.6/site-packages/flask/app.py", line 1952, in full_dispatch_request
    return self.finalize_request(rv)
  File "/usr/local/lib64/python3.6/site-packages/flask/app.py", line 1967, in finalize_request
    response = self.make_response(rv)
  File "/usr/local/lib64/python3.6/site-packages/flask/app.py", line 2097, in make_response
    "The view function did not return a valid response. The"
TypeError: The view function did not return a valid response. The function either returned None or ended without a return statement.

The solution is as follows:

@page_index.route('/')
def index():
    return flask.redirect('/pythoncgi/')

Similar Posts: