OSError: image file is truncated (74 bytes not processed)
Created by: yisampi
训练的时候报错:OSError: image file is truncated
环境:
$ pip list|grep paddle
paddlehub 1.7.0
paddlepaddle-gpu 1.8.0.post107
2020-06-17 15:00:39,715-WARNING: Your reader has raised an exception! Exception in thread Thread-2: Traceback (most recent call last): File "/data/anaconda3/envs/paddle/lib/python3.7/threading.py", line 926, in _bootstrap_inner self.run() File "/data/anaconda3/envs/paddle/lib/python3.7/threading.py", line 870, in run self._target(*self._args, **self._kwargs) File "/data/anaconda3/envs/paddle/lib/python3.7/site-packages/paddle/fluid/reader.py", line 1156, in thread_main six.reraise(*sys.exc_info()) File "/data/anaconda3/envs/paddle/lib/python3.7/site-packages/six.py", line 703, in reraise raise value File "/data/anaconda3/envs/paddle/lib/python3.7/site-packages/paddle/fluid/reader.py", line 1136, in thread_main for tensors in self._tensor_reader(): File "/data/anaconda3/envs/paddle/lib/python3.7/site-packages/paddlehub/reader/cv_reader.py", line 166, in _data_reader image = preprocess(image_path) File "/data/anaconda3/envs/paddle/lib/python3.7/site-packages/paddlehub/reader/cv_reader.py", line 117, in preprocess self.image_height) File "/data/anaconda3/envs/paddle/lib/python3.7/site-packages/paddlehub/io/augmentation.py", line 109, in image_resize return img.resize((width, height), interpolation_method) File "/data/anaconda3/envs/paddle/lib/python3.7/site-packages/PIL/Image.py", line 1886, in resize self.load() File "/data/anaconda3/envs/paddle/lib/python3.7/site-packages/PIL/ImageFile.py", line 247, in load "(%d bytes not processed)" % len(b) OSError: image file is truncated (74 bytes not processed)
Traceback (most recent call last): File "img_classifier-efficientnetb7-AdamWeight.py", line 111, in finetune(args) File "img_classifier-efficientnetb7-AdamWeight.py", line 101, in finetune task.finetune_and_eval() File "/data/anaconda3/envs/paddle/lib/python3.7/site-packages/paddlehub/finetune/task/base_task.py", line 868, in finetune_and_eval return self.finetune(do_eval=True) File "/data/anaconda3/envs/paddle/lib/python3.7/site-packages/paddlehub/finetune/task/base_task.py", line 889, in finetune run_states = self._run(do_eval=do_eval) File "/data/anaconda3/envs/paddle/lib/python3.7/site-packages/paddlehub/finetune/task/base_task.py", line 1073, in _run for run_step, batch in enumerate(data_reader(), start=1): File "/data/anaconda3/envs/paddle/lib/python3.7/site-packages/paddle/fluid/reader.py", line 1102, in next return self._reader.read_next() paddle.fluid.core_avx.EnforceNotMet:
C++ Call Stacks (More useful to developers):
0 std::string paddle::platform::GetTraceBackString<std::string const&>(std::string const&, char const*, int) 1 paddle::platform::EnforceNotMet::EnforceNotMet(std::string const&, char const*, int) 2 paddle::operators::reader::BlockingQueue<std::vector<paddle::framework::LoDTensor, std::allocatorpaddle::framework::LoDTensor > >::Receive(std::vector<paddle::framework::LoDTensor, std::allocatorpaddle::framework::LoDTensor >) 3 paddle::operators::reader::PyReader::ReadNext(std::vector<paddle::framework::LoDTensor, std::allocatorpaddle::framework::LoDTensor >) 4 std::_Function_handler<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> (), std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result, std::__future_base::_Result_base::_Deleter>, unsigned long> >::_M_invoke(std::_Any_data const&) 5 std::__future_base::_State_base::_M_do_set(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>&, bool&) 6 ThreadPool::ThreadPool(unsigned long)::{lambda()#1 (closed)}::operator()() const
Error Message Summary:
Error: Blocking queue is killed because the data reader raises an exception [Hint: Expected killed_ != true, but received killed_:1 == true:1.] at (/paddle/paddle/fluid/operators/reader/blocking_queue.h:141)