Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSError: image file is truncated (43 bytes not processed) #72

Open
Vietanh239 opened this issue Jun 9, 2021 · 0 comments
Open

OSError: image file is truncated (43 bytes not processed) #72

Vietanh239 opened this issue Jun 9, 2021 · 0 comments

Comments

@Vietanh239
Copy link

I ran own my train data and got a problem with Pillow. I have installed Pillow==6.2.2 and Python==3.7

Here is my problem:

Original Traceback (most recent call last):
File "/root/anaconda3/envs/test/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 202, in _worker_loop
data = fetcher.fetch(index)
File "/root/anaconda3/envs/test/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/root/anaconda3/envs/test/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "tools/../vedastr/datasets/lmdb_dataset.py", line 81, in getitem
img, label = self.read_data(index)
File "tools/../vedastr/datasets/lmdb_dataset.py", line 73, in read_data
img = Image.open(buf).convert('RGB') # for color image
File "/root/anaconda3/envs/test/lib/python3.7/site-packages/PIL/Image.py", line 930, in convert
self.load()
File "/root/anaconda3/envs/test/lib/python3.7/site-packages/PIL/ImageFile.py", line 249, in load
"(%d bytes not processed)" % len(b)
OSError: image file is truncated (43 bytes not processed)

How to solve it? Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant