python/lib/gen_code.py: fix error string