Debug Python PDF generation errors by using unbuffered output and stderr inspection to reveal actual tracebacks