Fixed not printing error info in python 2.6