reduce need_get_error in generator.py