In win32ui apps "'error: Callback must return an integer, or None'" is raised without any info which callback function/method (and optionally which Hook/Window) it is about. No traceback stack as well. Thus it is quite impossible to locate the problem.
PyErr_SetString(ui_module_error, "Callback must return an integer, or None");
There should be some info raised with the exception.