登录注册 剑阁旅游网欢迎您!在旅行中寻找最年轻的自己
当前位置:首页 > 旅游景点 > 

30个必去旅行地, 去过15个就厉害了!

编辑:优优 时间:2023-12-27 23:21:02 浏览量:
TypeError: The view function for 'rewrite_text_api' did not return a valid response. The function either returned None or ended without a return statement. // Werkzeug Debugger

TypeError

TypeError: The view function for 'rewrite_text_api' did not return a valid response. The function either returned None or ended without a return statement.

Traceback (most recent call last)

  • File "D:\app\miniconda3\envs\crawl\lib\site-packages\flask\app.py", line 1478, in __call__

        def __call__(self, environ: dict, start_response: t.Callable) -> t.Any:
            """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)
  • File "D:\app\miniconda3\envs\crawl\lib\site-packages\flask\app.py", line 1458, in wsgi_app

                try:
                    ctx.push()
                    response = self.full_dispatch_request()
                except Exception as e:
                    error = e
                    response = self.handle_exception(e)
                except:  # noqa: B001
                    error = sys.exc_info()[1]
                    raise
                return response(environ, start_response)
            finally:
  • File "D:\app\miniconda3\envs\crawl\lib\site-packages\flask\app.py", line 1455, in 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:  # noqa: B001
                    error = sys.exc_info()[1]
  • File "D:\app\miniconda3\envs\crawl\lib\site-packages\flask\app.py", line 870, in 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,
  • File "D:\app\miniconda3\envs\crawl\lib\site-packages\flask\app.py", line 889, in 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
                )
  • File "D:\app\miniconda3\envs\crawl\lib\site-packages\flask\app.py", line 1161, in 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 'rewrite_text_api' 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 debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error. If you enable JavaScript you can also use additional features such as code execution (if the evalex feature is enabled), automatic pasting of the exceptions and much more.

Console Locked

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.

PIN:

当地美食

留言跟帖

(网友评论仅供其表达个人看法,并不表明本站立场)

网友评论