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:
- TypeError: ‘unicode’ object is not callable
- TypeError: ‘unicode’ object is not callable
- [Solved] SQLAlchemy Error: ImportError: cannot import name ‘TYPE_CHECKING’
- Python crawling picture prompt urllib.error.httperror: http error 403: forbidden solution
- Python AttributeError: ‘unicode’ object has no attribute ‘tzinfo’
- Django startup error: generator expression must be parentized
- Unable to return file stream in Python 3, uwsgi report error
- [Solved] peewee error: ImportError: No module named ‘MySQLdb’;pymysql error: from . import connections # noqa: E402
- AttributeError: ‘NoneType’ object has no attribute ‘split’ [How to Solve]
- [Solved] Django error: AttributeError: ‘QuerySet’ object has no attribute ‘id’