-
-
Notifications
You must be signed in to change notification settings - Fork 86
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
List index out of range #58
Comments
I am having the same problem, all the same versions with exception being I'm on a Mac. |
The error actually has nothing to do with lines 150-151 of document.py as suggested in #36
Please leave those lines unchanged. It basically means that there isn't an answer for that question for the text that is being given to the extractor. I would suggest using try, except, else blocks for each of the questions as shown below to see which question is not being answered.
Similarly in the example given in parse_single_from_code.py , when you try using the lead or title short which have very little text content you may get the same error. But for text , you will see that all the questions are answered and you don't encounter this error. |
Describe the bug
I tried to run the example parse_from_newsplease.py.
When attempting to extract the top answer for all 6 questions, I receive a list index out of range error, similar to #36.
Sadly, his proposed fix does not work in my case.
The error doesn't occur when trying to only extract Who, What and When.
To Reproduce
I used the code from parse_from_newsplease.py and added a few lines to extract and print answers for all 6 questions.
I installed Giveme5W1H through pip.
Expected behavior
I expected to receive all six answers.
Versions (please complete the following information):
The text was updated successfully, but these errors were encountered: