'Getting "list out of range" error while running run_squad.py from huggingface for question answering. How to solve?

So trying to run the script 'run_squad.py' provided by huggingface. Used the code to convert csv to json squad 2.0 format which gives the correct format when checked.

code: code where run_squad from huggingface is being run

But when trying to run the script, it gives error "list out of range", [error screenshotwhat could be the problem?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source