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

Fix "List index out of range" for sorted_aligned_effects #506

Open
1 task
Svenstar74 opened this issue Dec 13, 2023 · 0 comments
Open
1 task

Fix "List index out of range" for sorted_aligned_effects #506

Svenstar74 opened this issue Dec 13, 2023 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@Svenstar74
Copy link
Contributor

Describe the bug

The problem occurs when I complete the quiz as a userB. It doesn't happen always but very often for me.
The backend responds with a 500 error, which also breaks the frontend, because there are no alignment scores, etc. to display.

When I have the backend running locally, I get the error message, that the list index is out of range for sorted_aligned_effects[2] in line 44 below. If I print the sorted_aligned_effects list, I indeed can see that there are only two entries.

To Reproduce

Here's a video that shows me reproducing it.
Please note, that it also happens for other combinations of answers. Selecting always the first answer is just more reliable for me to get the error.

2023-12-13.21-44-15.mp4

Expected behavior

I would assume that the fix would involve to guarantee that the list always has three items, so that the api call doesn't fail.

Task

  • Investigate why the sorted_aligned_effects sometimes has only two values instead of the expected three?
@Svenstar74 Svenstar74 added the bug Something isn't working label Dec 13, 2023
@danmash danmash added the good first issue Good for newcomers label Jan 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants