when using python write unicode string into a file, it may throw below exception:
f.writelines(line)
TypeError: writelines() argument must be a sequence of strings
we need to change the code to below:
f.writelines(line.encode('utf8'))
I have tried, after change the code, exception fixed.