Nov-03-2020, 03:13 PM
Hello! I'm in the works of a flask app which I already had issues with and some nice ppl helped me, and am having other issues...
I have this if statement:
My code: https://pastebin.com/ukMv4nTy
I have this if statement:
if not ((lines[4] == lines[6] == dataseg[0]) & (lines[5] == dataseg[1])):and I get this error:
Error:if not ((lines[5] == lines[7] == dataseg[0]) & (lines[6] == dataseg[1])):
IndexError: tuple index out of range
The full error being:Error:2020-11-03 17:09:58,492] ERROR in app: Exception on /send [POST]
Traceback (most recent call last):
File "/home/aggam/.local/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/home/aggam/.local/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/aggam/.local/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/aggam/.local/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/home/aggam/.local/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/home/aggam/.local/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "app.py", line 70, in send
return render_template("code.html", ERRS=check.check(code))
File "app.py", line 53, in check
if not ((lines[5] == lines[7] == dataseg[0]) & (lines[6] == dataseg[1])):
IndexError: tuple index out of range
Can u guys help me? (sry my code is a mess LMAO)My code: https://pastebin.com/ukMv4nTy