版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/jin739738709/article/details/73017456
'utf-8' codec can't encode character '\udcd5' in position 2575: surrogates not allowed
源代码出错的地方如下:
filenames = [os.path.join(data_dir, '/data_batch_%d.bin' %ii)#find filename for ii in np.arange(1, 6)]
所以有时候并不是代码里面有中文,或者用中文输入法输入的英文
而是我应用不规范导致的解释器无法解释