Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some plagiarism comparison page returns 500 #18

Closed
kevinyang372 opened this issue Jan 27, 2021 · 0 comments
Closed

Some plagiarism comparison page returns 500 #18

kevinyang372 opened this issue Jan 27, 2021 · 0 comments

Comments

@kevinyang372
Copy link
Owner

[2021-01-27 08:37:09,194] ERROR in app: Exception on /compare/19/1 [GET]
Traceback (most recent call last):
  File "/Users/kevin/Desktop/Github/code-eval/venv/lib/python3.9/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/Users/kevin/Desktop/Github/code-eval/venv/lib/python3.9/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/Users/kevin/Desktop/Github/code-eval/venv/lib/python3.9/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/Users/kevin/Desktop/Github/code-eval/venv/lib/python3.9/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/Users/kevin/Desktop/Github/code-eval/venv/lib/python3.9/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/Users/kevin/Desktop/Github/code-eval/venv/lib/python3.9/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/Users/kevin/Desktop/Github/code-eval/web/utils.py", line 115, in decorated_function
    return f(*args, **kwargs)
  File "web/blueprints/compare.py", line 20, in compare
    parsed1, parsed2 = p.highlight_diff()
  File "/Users/kevin/Desktop/Github/code-eval/web/plagiarism.py", line 260, in highlight_diff
    d = self.ast_match_wrapper(self.tree_1, self.tree_2)
  File "/Users/kevin/Desktop/Github/code-eval/web/plagiarism.py", line 253, in ast_match_wrapper
    res = func(node1, node2)
  File "/Users/kevin/Desktop/Github/code-eval/web/plagiarism.py", line 229, in func
    elif not func(v, getattr(node2, k), next_parent):
  File "/Users/kevin/Desktop/Github/code-eval/web/plagiarism.py", line 246, in func
    if not func(node1[i], node2[i]):
  File "/Users/kevin/Desktop/Github/code-eval/web/plagiarism.py", line 229, in func
    elif not func(v, getattr(node2, k), next_parent):
  File "/Users/kevin/Desktop/Github/code-eval/web/plagiarism.py", line 246, in func
    if not func(node1[i], node2[i]):
IndexError: list index out of range
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant