This error usually occurs when an incorrect character encoding is used. Your program attempts to read a file using the default encoding scheme 'gbk', but the file contains bytes that cannot be decoded using this scheme – this is indicated by the message "illegal multibyte sequence".
You can try to fix this error by specifying the correct character encoding scheme. One approach is to open the file using the correct encoding scheme, as shown below:
with open('myfile.txt', 'r', encoding='utf-8') as f:
requests_list = f.read().splitlines()here,encoding ='utf-8'The parameter explicitly instructs Python to open the file using the UTF-8 character encoding scheme, which supports a broader range of characters than the 'gbk' scheme.
Replace 'myfile.txt' with your actual file name, and replace 'utf-8' with the appropriate encoding scheme as needed.
I hope this answer helps you!