Open Samuel-wei opened 3 years ago
Output Error:
UnicodeEncodeError: 'utf-8' codec can't encode characters in position 25-36: surrogates not allowed
Solving:
https://python3-cookbook.readthedocs.io/zh_CN/latest/c05/p15_printing_bad_filenames.html
with open(new_file, 'w') as file_object: change to: with open(new_file, 'w', encoding='utf-8') as file_object:
with open(new_file, 'w') as file_object:
with open(new_file, 'w', encoding='utf-8') as file_object:
Output Error: