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

Issue with Pillow #27

Open
mkaizen opened this issue Dec 31, 2019 · 1 comment
Open

Issue with Pillow #27

mkaizen opened this issue Dec 31, 2019 · 1 comment

Comments

@mkaizen
Copy link

mkaizen commented Dec 31, 2019

First off awesome work Charles, I've been using Tindetheus for the past two weeks and it works amazing. Thanks for helping me with my initial install issues. Also want to preface this with the fact I'm a CS student still so apologies if this is a simple fix. When I went to run it today I used the browse function added 50 or so profiles and then train and everything went smoothly as usual. When I tried to get it to like profiles though I got this error.

Number of images: 47
Number of batches: 1
Traceback (most recent call last):
File "c:\users\matthew\anaconda3\envs\py36\lib\site-packages\imageio\plugins\pillow.py", line 671, in pil_try_read
im.getdata()[0]
File "c:\users\matthew\anaconda3\envs\py36\lib\site-packages\PIL\Image.py", line 1304, in getdata
self.load()
File "c:\users\matthew\anaconda3\envs\py36\lib\site-packages\PIL\ImageFile.py", line 272, in load
raise_ioerror(err_code)
File "c:\users\matthew\anaconda3\envs\py36\lib\site-packages\PIL\ImageFile.py", line 59, in raise_ioerror
raise IOError(message + " when reading image file")
OSError: broken data stream when reading image file

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "c:\users\matthew\anaconda3\envs\py36\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "c:\users\matthew\anaconda3\envs\py36\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\Matthew\Anaconda3\envs\py36\Scripts\tindetheus.exe_main
.py", line 7, in
File "c:\users\matthew\anaconda3\envs\py36\lib\site-packages\tindetheus\tindetheus.py", line 299, in command_line_run
retries=defaults['retries'])
File "c:\users\matthew\anaconda3\envs\py36\lib\site-packages\tindetheus\tindetheus.py", line 153, in main
my_sess.like()
File "c:\users\matthew\anaconda3\envs\py36\lib\site-packages\tindetheus\tinder_client.py", line 314, in like
self.like_or_dislike_users(users)
File "c:\users\matthew\anaconda3\envs\py36\lib\site-packages\tindetheus\tinder_client.py", line 219, in like_or_dislike_users
image_size)
File "c:\users\matthew\anaconda3\envs\py36\lib\site-packages\tindetheus\facenet_clone\facenet.py", line 247, in load_data
img = imageio.imread(image_paths[i])
File "c:\users\matthew\anaconda3\envs\py36\lib\site-packages\imageio\core\functions.py", line 264, in imread
reader = read(uri, format, "i", **kwargs)
File "c:\users\matthew\anaconda3\envs\py36\lib\site-packages\imageio\core\functions.py", line 186, in get_reader
return format.get_reader(request)
File "c:\users\matthew\anaconda3\envs\py36\lib\site-packages\imageio\core\format.py", line 164, in get_reader
return self.Reader(self, request)
File "c:\users\matthew\anaconda3\envs\py36\lib\site-packages\imageio\core\format.py", line 214, in init
self._open(**self.request.kwargs.copy())
File "c:\users\matthew\anaconda3\envs\py36\lib\site-packages\imageio\plugins\pillow.py", line 300, in _open
return PillowFormat.Reader._open(self, pilmode=pilmode, as_gray=as_gray)
File "c:\users\matthew\anaconda3\envs\py36\lib\site-packages\imageio\plugins\pillow.py", line 137, in _open
pil_try_read(self._im)
File "c:\users\matthew\anaconda3\envs\py36\lib\site-packages\imageio\plugins\pillow.py", line 682, in pil_try_read
raise ValueError(error_message)
ValueError: Could not load ""
Reason: "broken data stream when reading image file"
Please see documentation at: http://pillow.readthedocs.io/en/latest/installation.html#external-libraries

@cjekel
Copy link
Owner

cjekel commented Jan 17, 2020

How often has this pillow error come up? It's possible that a profile image downloaded ended up being just an empty file.

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

2 participants