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
IndexError: list index out of range #89
Comments
Actually, the problem was due to a document being too small. Contents of the file that caused the problem:
Source: Line 109 in b94a06e
We should do either one of these:
|
Actually, I have the same issue only my document is definitely not too small. I believe that it's too large. Is there an intuitive way to handle this error? |
I'm doing this until we find a fix: for d in my_docs:
try:
docs.add(d)
except Exception as e:
print('Error adding %s: %s' % (d, e)) |
@OliverOffing's solution is the preferred solution. You add them, get an exception if it fails, and you decide how to deal with the exception. You can skip and continue or try to figure out what is wrong yourself. The best we have is checks to see if it looks like a document. The specific error above, about the index error for very short documents, has been fixed |
I'm trying to add 250 documents but I'm hitting this error. It seems that this error shows up when trying to add >100 documents. Is that a hard limit I'm hitting or could there be something else, like perhaps one of the files if faulty?
The text was updated successfully, but these errors were encountered: