I couldn’t find an unbalanced bracket either but I did spot what looks like a formatted string
textPerc.setText(f'You have completed {str((((trials.thisN + 1) / 300) * 100)):.1f} % of this experiment');
I would expect this to give you a syntax error in the auto translate. Did you manually override it?