How do you normally get responses from the Cedrus buttonBox?
It could be that you just need to check buttonBox exists first with if buttonBox:.
if buttonBox: