錯誤 UnicodeDecodeError: “utf-8” codec can”t decode byte 0xff in position 0: invalid start byte

| | | | | | | | | | | | | | |

https://github.com/affinelayer/pix2pix-tensorflow/tree/ master/tools

在上述站點編譯“process.py”時出錯。

 python tools/process.py --input_dir data - - 操作resize --outp ut_dir data2/resize data/0.jpg -> data2/resize/0.png 

Traceback(最近一次調用最後一次):

文件“tools/process.py”,第 235 行,在 < ;模塊> main() 文件“tools/process.py”,第 167 行,在 main src = load(src_path) 文件“tools/process.py”,第 113 行,在加載內容 = open(path).read() 文件“/ home/user/anaconda3/envs/tensorflow_2/lib/python3.5/codecs.py”,第 321 行,在 decode (result, used) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: "utf-8 " codec can"t decode byte 0xff in position 0: invalid start byte 

錯誤原因是什麼?Python的版本是3.5.2。