1
resposta

ValueError

quando tento abrir a pagina http://127.0.0.1:5000/novo aparece o seguinte erro: ValueError ValueError: View function did not return a response

Traceback (most recent call last)
File "C:\Users\luckl\PycharmProjects\pythonProject1\venv\Lib\site-packages\flask\app.py", line 1997, in __call__
return self.wsgi_app(environ, start_response)
File "C:\Users\luckl\PycharmProjects\pythonProject1\venv\Lib\site-packages\flask\app.py", line 1985, in wsgi_app
response = self.handle_exception(e)
File "C:\Users\luckl\PycharmProjects\pythonProject1\venv\Lib\site-packages\flask\app.py", line 1540, in handle_exception
reraise(exc_type, exc_value, tb)
File "C:\Users\luckl\PycharmProjects\pythonProject1\venv\Lib\site-packages\flask\_compat.py", line 33, in reraise
raise value
File "C:\Users\luckl\PycharmProjects\pythonProject1\venv\Lib\site-packages\flask\app.py", line 1982, in wsgi_app
response = self.full_dispatch_request()
File "C:\Users\luckl\PycharmProjects\pythonProject1\venv\Lib\site-packages\flask\app.py", line 1615, in full_dispatch_request
return self.finalize_request(rv)
File "C:\Users\luckl\PycharmProjects\pythonProject1\venv\Lib\site-packages\flask\app.py", line 1630, in finalize_request
response = self.make_response(rv)
File "C:\Users\luckl\PycharmProjects\pythonProject1\venv\Lib\site-packages\flask\app.py", line 1725, in make_response
raise ValueError('View function did not return a response')
ValueError: View function did not return a response
The debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error.
To switch between the interactive traceback and the plaintext one, you can click on the "Traceback" headline. From the text traceback you can also create a paste of it. For code execution mouse-over the frame you want to debug and click on the console icon on the right side.

You can execute arbitrary Python code in the stack frames and there are some extra helpers available for introspection:

dump() shows all variables in the frame
dump(obj) dumps all that's known about the object
1 resposta
O post foi fechado por inatividade. Para continuar o assunto, recomendamos criar um novo tópico. Bons Estudos!