Span out of index Error

I have tried running a custom annotator model using textacy, scispacy and spacy. But I encountered this error. Any idea why this error might be caused?

File "span.pyx", line 190, in spacy.tokens.span.Span.getitem
IndexError: [E201] Span index out of range.

My environment:
Python: 3.8.7
Spacy: 2.3.5
Scispacy: 0.2.3
Textacy: 0.10.1


Could you provide a bit more context when you're running into this error? Are you using a custom Prodigy recipe? Can you paste the command/code you're running, and a bit more of the stack trace?

It looks like you're trying to access a token that is outside the Span's boundaries, or perhaps you have an empty Span, but without more context it's really difficult to tell what's going on.