Update t_py_generator.cc

I think it should not fall if the string is not valid utf-8