TypeError: The view function for 'create_auth_token' did not return a valid response. The function either returned None or ended without a return statement.
__call__ ) -> cabc.Iterable[bytes]:
"""The WSGI server calls the Flask application object as the
WSGI application. This calls :meth:`wsgi_app`, which can be
wrapped to apply middleware.
"""
return self.wsgi_app(environ, start_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
wsgi_app try:
ctx.push()
response = self.full_dispatch_request()
except Exception as e:
error = e
response = self.handle_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^
except:
error = sys.exc_info()[1]
raise
return response(environ, start_response)
finally:
wsgi_app ctx = self.request_context(environ)
error: BaseException | None = None
try:
try:
ctx.push()
response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
except Exception as e:
error = e
response = self.handle_exception(e)
except:
error = sys.exc_info()[1]
full_dispatch_request rv = self.preprocess_request()
if rv is None:
rv = self.dispatch_request()
except Exception as e:
rv = self.handle_user_exception(e)
return self.finalize_request(rv) ^^^^^^^^^^^^^^^^^^^^^^^^^
def finalize_request(
self,
rv: ft.ResponseReturnValue | HTTPException,
from_error_handler: bool = False,
finalize_request with the `from_error_handler` flag. If enabled, failures in
response processing will be logged and otherwise ignored.
:internal:
"""
response = self.make_response(rv) ^^^^^^^^^^^^^^^^^^^^^^
try:
response = self.process_response(response)
request_finished.send(
self, _async_wrapper=self.ensure_sync, response=response
)
make_response " (body, status), or (body, headers)."
)
# the body must not be None
if rv is None:
raise TypeError( ^
f"The view function for {request.endpoint!r} did not"
" return a valid response. The function either returned"
" None or ended without a return statement."
)
TypeError: The view function for 'create_auth_token' did not return a valid response. The function either returned None or ended without a return statement.
This is the Copy/Paste friendly version of the traceback.
The console is locked and needs to be unlocked by entering the PIN. You can find the PIN printed out on the standard output of your shell that runs the server.