Code runs on second try

I’m starting vague here because I suspect it’s something obvious. I’m happy to offer clarification if that helps. Anyway, here goes:

I’m using Python running GPIO (Rpi.GPIO_BP) to communicate with a screen. First run after boot, it hangs. Second run onwards, it works fine.

This makes me think that perhaps the first unsuccessful run causes something to be initialised that I’m missing(?)

Any insight would be greatly appreciated…