I have since discovered what my issue is. I had comments in my pokemon.pbs file to separate out sections of the document for each regional Pokédex and I was denoting them with # [0] — Region Name. It appears as though the parsing logic is designed to read for Pokémon on any line that has square...
Hey there! I love what you've done here, and this port has been invaluable for me!
That said, I keep intermittently running into this error on occasion when I switch from one Pokémon to another, and it causes the program to crash irreparably every time — and lose all of my progress as well 😭...