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

'PngImageFile' object has no attribute '_PngImageFile__frame' #95

Closed
ShowTimeJMJ opened this issue Apr 2, 2020 · 3 comments
Closed

Comments

@ShowTimeJMJ
Copy link

Random Seed: 2371
Traceback (most recent call last):
File "main_train.py", line 27, in
real = functions.read_image(opt)
File "D:\ProgramData\PycharmProjects\SinGAN\SinGAN\functions.py", line 150, in read_image
x = img.imread('%s/%s' % (opt.input_dir,opt.input_name))
File "d:\ProgramData\Anaconda3\envs\pytorch\lib\site-packages\skimage\io_io.py", line 48, in imread
img = call_plugin('imread', fname, plugin=plugin, **plugin_args)
File "d:\ProgramData\Anaconda3\envs\pytorch\lib\site-packages\skimage\io\manage_plugins.py", line 210, in call_plugin
return func(*args, **kwargs)
File "d:\ProgramData\Anaconda3\envs\pytorch\lib\site-packages\skimage\io_plugins\imageio_plugin.py", line 10, in imread
return np.asarray(imageio_imread(*args, **kwargs))
File "d:\ProgramData\Anaconda3\envs\pytorch\lib\site-packages\imageio\core\functions.py", line 267, in imread
return reader.get_data(0)
File "d:\ProgramData\Anaconda3\envs\pytorch\lib\site-packages\imageio\core\format.py", line 346, in get_data
im, meta = self._get_data(index, **kwargs)
File "d:\ProgramData\Anaconda3\envs\pytorch\lib\site-packages\imageio\plugins\pillow.py", line 301, in _get_data
im, info = PillowFormat.Reader._get_data(self, index)
File "d:\ProgramData\Anaconda3\envs\pytorch\lib\site-packages\imageio\plugins\pillow.py", line 170, in _get_data
i = self._im.tell()
File "d:\ProgramData\Anaconda3\envs\pytorch\lib\site-packages\PIL\PngImagePlugin.py", line 827, in tell
return self.__frame
AttributeError: 'PngImageFile' object has no attribute '_PngImageFile__frame'

@hugovk
Copy link

hugovk commented Apr 3, 2020

This was a problem in Pillow 7.1.0, fixed in 7.1.1. Please could you upgrade and try again?

python-pillow/Pillow#4509

@ShowTimeJMJ
Copy link
Author

ok,it's done.Thank you

@hugovk
Copy link

hugovk commented Apr 26, 2020

@ShowTimeJMJ If it's ok for you now, please can you close this issue?

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