‘utf-8‘ codec can‘t encode characters in position 60263-60268: surrogates not allowed

I replaced the audio file in the folder, and the above error occurred. After searching for a long time, various solutions on the Internet were prosperous and complicated, and they had no effect. In fact, the simplest solution that should be tried in the first step is:

See if there is any Chinese in the file name, if so, change all to numbers or English, and try again, I solved this error by relying on this method

Not for this question, refer to other encoding and decoding schemes about utf-8 on the Internet

Guess you like

Origin blog.csdn.net/qq_38563206/article/details/126604121