Reason for the error:
I saved the generated image file and the csv data file in the same directory, which led to reading the jpg file when I continued the walk. Of course, it cannot be read in utf-8 format
Workaround:
1. (recommended) Add a judgment condition to the read file, such as using split to judge the file suffix
for root,dirs,files in os.walk(indir+'/'+user):for f in files:if f.split('.')[1span>] == 'csv':#TODO
2. The generated files are saved in other directories. This method is essentially to ensure that the files in the source directory are all the data files we want to read, excluding other types of files
前言My computer is configured to