I don’t know how to reproduce this other than exactly now.
It’s not unusual that I see this. It only really happens when messing with the very bottom of the file in Python mode.
What I’m doing to trigger it is to put the cursor at the very last visible character a ..., context)
and then the error appears.