tactlabs / error-archive

All issues related to tact and tact labs work
0 stars 0 forks source link

Function does not return a valid response #302

Open Ananthu2oo3 opened 1 year ago

Ananthu2oo3 commented 1 year ago

Traceback (most recent call last): File "/home/sivaraam/.local/lib/python3.8/site-packages/flask/app.py", line 2548, in call return self.wsgi_app(environ, start_response) File "/home/sivaraam/.local/lib/python3.8/site-packages/flask/app.py", line 2528, in wsgi_app response = self.handle_exception(e) File "/home/sivaraam/.local/lib/python3.8/site-packages/flask/app.py", line 2525, in wsgi_app response = self.full_dispatch_request() File "/home/sivaraam/.local/lib/python3.8/site-packages/flask/app.py", line 1823, in full_dispatch_request return self.finalize_request(rv) File "/home/sivaraam/.local/lib/python3.8/site-packages/flask/app.py", line 1842, in finalize_request response = self.make_response(rv) File "/home/sivaraam/.local/lib/python3.8/site-packages/flask/app.py", line 2134, in make_response raise TypeError( TypeError: The view function for 'test_scanner' did not return a valid response. The function either returned None or ended without a return statement.

Ananthu2oo3 commented 1 year ago

The return statement was inside a conditional check, so it was not called for all cases. This can be solved by adding return statement that works for all cases