解决raise OSError(“Truncated File Read“)OSError: Truncated File Read

Posted 沉迷单车的追风少年

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了解决raise OSError(“Truncated File Read“)OSError: Truncated File Read相关的知识,希望对你有一定的参考价值。

项目场景:

python numpy 数据集读取


问题描述:

完整报错:

Traceback (most recent call last):
  File "test_data.py", line 28, in <module>
    dataA1 = load_images(path + \'trainB/\')
  File "test_data.py", line 16, in load_images
    pixels = load_img(path + filename, target_size=size)
  File "/root/anaconda3/envs/tf35/lib/python3.7/site-packages/tensorflow/python/keras/preprocessing/image.py", line 301, in load_img
    target_size=target_size, interpolation=interpolation)
  File "/root/anaconda3/envs/tf35/lib/python3.7/site-packages/keras_preprocessing/image/utils.py", line 114, in load_img
    img = pil_image.open(io.BytesIO(f.read()))
  File "/root/anaconda3/envs/tf35/lib/python3.7/site-packages/PIL/Image.py", line 3016, in op

以上是关于解决raise OSError(“Truncated File Read“)OSError: Truncated File Read的主要内容,如果未能解决你的问题,请参考以下文章

python pip安装 mysqlclient 报错 raise EnvironmentError("%s not found" % (_mysql_config_path,))

为啥在 raise_application_error 未执行之前的触发器内部代码?

“OSError: [WinError 1455]页面文件太小,无法完成操作。”解决方案

[解决问题] pandas读取csv文件报错OSError解决方案

OSError: sndfile library not found 解决方案

[python] 解决OSError: Address already in use