diagnose python bug