<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  "http://www.w3.org/TR/html4/loose.dtd">
<html>
  <head>
    <title>TypeError: The view function did not return a valid response. The function either returned None or ended without a return statement. // Werkzeug Debugger</title>
    <link rel="stylesheet" href="?__debugger__=yes&amp;cmd=resource&amp;f=style.css"
        type="text/css">
    <!-- We need to make sure this has a favicon so that the debugger does
         not accidentally trigger a request to /favicon.ico which might
         change the application's state. -->
    <link rel="shortcut icon"
        href="?__debugger__=yes&amp;cmd=resource&amp;f=console.png">
    <script src="?__debugger__=yes&amp;cmd=resource&amp;f=debugger.js"></script>
    <script type="text/javascript">
      var TRACEBACK = 1771037379792,
          CONSOLE_MODE = false,
          EVALEX = true,
          EVALEX_TRUSTED = false,
          SECRET = "FP0Qi7t7JudA1MGMJ8uI";
    </script>
  </head>
  <body style="background-color: #fff">
    <div class="debugger">
<h1>TypeError</h1>
<div class="detail">
  <p class="errormsg">TypeError: The view function did not return a valid response. The function either returned None or ended without a return statement.</p>
</div>
<h2 class="traceback">Traceback <em>(most recent call last)</em></h2>
<div class="traceback">
  <h3></h3>
  <ul><li><div class="frame" id="frame-1771037379600">
  <h4>File <cite class="filename">"F:\anaconda3\Lib\site-packages\flask\app.py"</cite>,
      line <em class="line">2464</em>,
      in <code class="function">__call__</code></h4>
  <div class="source "><pre class="line before"><span class="ws"></span> </pre>
<pre class="line before"><span class="ws">    </span>def __call__(self, environ, start_response):</pre>
<pre class="line before"><span class="ws">        </span>&quot;&quot;&quot;The WSGI server calls the Flask application object as the</pre>
<pre class="line before"><span class="ws">        </span>WSGI application. This calls :meth:`wsgi_app` which can be</pre>
<pre class="line before"><span class="ws">        </span>wrapped to applying middleware.&quot;&quot;&quot;</pre>
<pre class="line current"><span class="ws">        </span>return self.wsgi_app(environ, start_response)</pre>
<pre class="line after"><span class="ws"></span> </pre>
<pre class="line after"><span class="ws">    </span>def __repr__(self):</pre>
<pre class="line after"><span class="ws">        </span>return &quot;&lt;%s %r&gt;&quot; % (self.__class__.__name__, self.name)</pre></div>
</div>

<li><div class="frame" id="frame-1771037378592">
  <h4>File <cite class="filename">"F:\anaconda3\Lib\site-packages\flask\app.py"</cite>,
      line <em class="line">2450</em>,
      in <code class="function">wsgi_app</code></h4>
  <div class="source "><pre class="line before"><span class="ws">            </span>try:</pre>
<pre class="line before"><span class="ws">                </span>ctx.push()</pre>
<pre class="line before"><span class="ws">                </span>response = self.full_dispatch_request()</pre>
<pre class="line before"><span class="ws">            </span>except Exception as e:</pre>
<pre class="line before"><span class="ws">                </span>error = e</pre>
<pre class="line current"><span class="ws">                </span>response = self.handle_exception(e)</pre>
<pre class="line after"><span class="ws">            </span>except:  # noqa: B001</pre>
<pre class="line after"><span class="ws">                </span>error = sys.exc_info()[1]</pre>
<pre class="line after"><span class="ws">                </span>raise</pre>
<pre class="line after"><span class="ws">            </span>return response(environ, start_response)</pre>
<pre class="line after"><span class="ws">        </span>finally:</pre></div>
</div>

<li><div class="frame" id="frame-1771037377392">
  <h4>File <cite class="filename">"F:\anaconda3\Lib\site-packages\flask\app.py"</cite>,
      line <em class="line">1867</em>,
      in <code class="function">handle_exception</code></h4>
  <div class="source "><pre class="line before"><span class="ws">            </span># if we want to repropagate the exception, we can attempt to</pre>
<pre class="line before"><span class="ws">            </span># raise it with the whole traceback in case we can do that</pre>
<pre class="line before"><span class="ws">            </span># (the function was actually called from the except part)</pre>
<pre class="line before"><span class="ws">            </span># otherwise, we just raise the error again</pre>
<pre class="line before"><span class="ws">            </span>if exc_value is e:</pre>
<pre class="line current"><span class="ws">                </span>reraise(exc_type, exc_value, tb)</pre>
<pre class="line after"><span class="ws">            </span>else:</pre>
<pre class="line after"><span class="ws">                </span>raise e</pre>
<pre class="line after"><span class="ws"></span> </pre>
<pre class="line after"><span class="ws">        </span>self.log_exception((exc_type, exc_value, tb))</pre>
<pre class="line after"><span class="ws">        </span>server_error = InternalServerError()</pre></div>
</div>

<li><div class="frame" id="frame-1771037377056">
  <h4>File <cite class="filename">"F:\anaconda3\Lib\site-packages\flask\_compat.py"</cite>,
      line <em class="line">39</em>,
      in <code class="function">reraise</code></h4>
  <div class="source "><pre class="line before"><span class="ws">    </span>import collections.abc as collections_abc</pre>
<pre class="line before"><span class="ws"></span> </pre>
<pre class="line before"><span class="ws">    </span>def reraise(tp, value, tb=None):</pre>
<pre class="line before"><span class="ws">        </span>if value.__traceback__ is not tb:</pre>
<pre class="line before"><span class="ws">            </span>raise value.with_traceback(tb)</pre>
<pre class="line current"><span class="ws">        </span>raise value</pre>
<pre class="line after"><span class="ws"></span> </pre>
<pre class="line after"><span class="ws">    </span>implements_to_string = _identity</pre>
<pre class="line after"><span class="ws"></span> </pre>
<pre class="line after"><span class="ws"></span>else:</pre>
<pre class="line after"><span class="ws">    </span>iterkeys = lambda d: d.iterkeys()</pre></div>
</div>

<li><div class="frame" id="frame-1771023233088">
  <h4>File <cite class="filename">"F:\anaconda3\Lib\site-packages\flask\app.py"</cite>,
      line <em class="line">2447</em>,
      in <code class="function">wsgi_app</code></h4>
  <div class="source "><pre class="line before"><span class="ws">        </span>ctx = self.request_context(environ)</pre>
<pre class="line before"><span class="ws">        </span>error = None</pre>
<pre class="line before"><span class="ws">        </span>try:</pre>
<pre class="line before"><span class="ws">            </span>try:</pre>
<pre class="line before"><span class="ws">                </span>ctx.push()</pre>
<pre class="line current"><span class="ws">                </span>response = self.full_dispatch_request()</pre>
<pre class="line after"><span class="ws">            </span>except Exception as e:</pre>
<pre class="line after"><span class="ws">                </span>error = e</pre>
<pre class="line after"><span class="ws">                </span>response = self.handle_exception(e)</pre>
<pre class="line after"><span class="ws">            </span>except:  # noqa: B001</pre>
<pre class="line after"><span class="ws">                </span>error = sys.exc_info()[1]</pre></div>
</div>

<li><div class="frame" id="frame-1771023233136">
  <h4>File <cite class="filename">"F:\anaconda3\Lib\site-packages\flask\app.py"</cite>,
      line <em class="line">1953</em>,
      in <code class="function">full_dispatch_request</code></h4>
  <div class="source "><pre class="line before"><span class="ws">            </span>rv = self.preprocess_request()</pre>
<pre class="line before"><span class="ws">            </span>if rv is None:</pre>
<pre class="line before"><span class="ws">                </span>rv = self.dispatch_request()</pre>
<pre class="line before"><span class="ws">        </span>except Exception as e:</pre>
<pre class="line before"><span class="ws">            </span>rv = self.handle_user_exception(e)</pre>
<pre class="line current"><span class="ws">        </span>return self.finalize_request(rv)</pre>
<pre class="line after"><span class="ws"></span> </pre>
<pre class="line after"><span class="ws">    </span>def finalize_request(self, rv, from_error_handler=False):</pre>
<pre class="line after"><span class="ws">        </span>&quot;&quot;&quot;Given the return value from a view function this finalizes</pre>
<pre class="line after"><span class="ws">        </span>the request by converting it into a response and invoking the</pre>
<pre class="line after"><span class="ws">        </span>postprocessing functions.  This is invoked for both normal</pre></div>
</div>

<li><div class="frame" id="frame-1771023233376">
  <h4>File <cite class="filename">"F:\anaconda3\Lib\site-packages\flask\app.py"</cite>,
      line <em class="line">1968</em>,
      in <code class="function">finalize_request</code></h4>
  <div class="source "><pre class="line before"><span class="ws">        </span>with the `from_error_handler` flag.  If enabled, failures in</pre>
<pre class="line before"><span class="ws">        </span>response processing will be logged and otherwise ignored.</pre>
<pre class="line before"><span class="ws"></span> </pre>
<pre class="line before"><span class="ws">        </span>:internal:</pre>
<pre class="line before"><span class="ws">        </span>&quot;&quot;&quot;</pre>
<pre class="line current"><span class="ws">        </span>response = self.make_response(rv)</pre>
<pre class="line after"><span class="ws">        </span>try:</pre>
<pre class="line after"><span class="ws">            </span>response = self.process_response(response)</pre>
<pre class="line after"><span class="ws">            </span>request_finished.send(self, response=response)</pre>
<pre class="line after"><span class="ws">        </span>except Exception:</pre>
<pre class="line after"><span class="ws">            </span>if not from_error_handler:</pre></div>
</div>

<li><div class="frame" id="frame-1771023233280">
  <h4>File <cite class="filename">"F:\anaconda3\Lib\site-packages\flask\app.py"</cite>,
      line <em class="line">2097</em>,
      in <code class="function">make_response</code></h4>
  <div class="source "><pre class="line before"><span class="ws">                    </span>&quot; (body, status), or (body, headers).&quot;</pre>
<pre class="line before"><span class="ws">                </span>)</pre>
<pre class="line before"><span class="ws"></span> </pre>
<pre class="line before"><span class="ws">        </span># the body must not be None</pre>
<pre class="line before"><span class="ws">        </span>if rv is None:</pre>
<pre class="line current"><span class="ws">            </span>raise TypeError(</pre>
<pre class="line after"><span class="ws">                </span>&quot;The view function did not return a valid response. The&quot;</pre>
<pre class="line after"><span class="ws">                </span>&quot; function either returned None or ended without a return&quot;</pre>
<pre class="line after"><span class="ws">                </span>&quot; statement.&quot;</pre>
<pre class="line after"><span class="ws">            </span>)</pre>
<pre class="line after"><span class="ws"></span> </pre></div>
</div>
</ul>
  <blockquote>TypeError: The view function did not return a valid response. The function either returned None or ended without a return statement.</blockquote>
</div>

<div class="plain">
    <p>
      This is the Copy/Paste friendly version of the traceback.
    </p>
    <textarea cols="50" rows="10" name="code" readonly>Traceback (most recent call last):
  File &quot;F:\anaconda3\Lib\site-packages\flask\app.py&quot;, line 2464, in __call__
    return self.wsgi_app(environ, start_response)
  File &quot;F:\anaconda3\Lib\site-packages\flask\app.py&quot;, line 2450, in wsgi_app
    response = self.handle_exception(e)
  File &quot;F:\anaconda3\Lib\site-packages\flask\app.py&quot;, line 1867, in handle_exception
    reraise(exc_type, exc_value, tb)
  File &quot;F:\anaconda3\Lib\site-packages\flask\_compat.py&quot;, line 39, in reraise
    raise value
  File &quot;F:\anaconda3\Lib\site-packages\flask\app.py&quot;, line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File &quot;F:\anaconda3\Lib\site-packages\flask\app.py&quot;, line 1953, in full_dispatch_request
    return self.finalize_request(rv)
  File &quot;F:\anaconda3\Lib\site-packages\flask\app.py&quot;, line 1968, in finalize_request
    response = self.make_response(rv)
  File &quot;F:\anaconda3\Lib\site-packages\flask\app.py&quot;, line 2097, in make_response
    raise TypeError(
TypeError: The view function did not return a valid response. The function either returned None or ended without a return statement.</textarea>
</div>
<div class="explanation">
  The debugger caught an exception in your WSGI application.  You can now
  look at the traceback which led to the error.  <span class="nojavascript">
  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.</span>
</div>
      <div class="footer">
        Brought to you by <strong class="arthur">DON'T PANIC</strong>, your
        friendly Werkzeug powered traceback interpreter.
      </div>
    </div>

    <div class="pin-prompt">
      <div class="inner">
        <h3>Console Locked</h3>
        <p>
          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.
        <form>
          <p>PIN:
            <input type=text name=pin size=14>
            <input type=submit name=btn value="Confirm Pin">
        </form>
      </div>
    </div>
  </body>
</html>

<!--

Traceback (most recent call last):
  File "F:\anaconda3\Lib\site-packages\flask\app.py", line 2464, in __call__
    return self.wsgi_app(environ, start_response)
  File "F:\anaconda3\Lib\site-packages\flask\app.py", line 2450, in wsgi_app
    response = self.handle_exception(e)
  File "F:\anaconda3\Lib\site-packages\flask\app.py", line 1867, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "F:\anaconda3\Lib\site-packages\flask\_compat.py", line 39, in reraise
    raise value
  File "F:\anaconda3\Lib\site-packages\flask\app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "F:\anaconda3\Lib\site-packages\flask\app.py", line 1953, in full_dispatch_request
    return self.finalize_request(rv)
  File "F:\anaconda3\Lib\site-packages\flask\app.py", line 1968, in finalize_request
    response = self.make_response(rv)
  File "F:\anaconda3\Lib\site-packages\flask\app.py", line 2097, in make_response
    raise TypeError(
TypeError: The view function did not return a valid response. The function either returned None or ended without a return statement.

-->