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

AttributeError: 'SeekableFileObject' object has no attribute 'readline' #1065

Open
oceanogeology opened this issue Mar 1, 2024 · 2 comments · May be fixed by #1084
Open

AttributeError: 'SeekableFileObject' object has no attribute 'readline' #1065

oceanogeology opened this issue Mar 1, 2024 · 2 comments · May be fixed by #1084

Comments

@oceanogeology
Copy link

trouble occur when reading some website address as follow, but same address is ok by skimage.io import imread:

File "/usr/local/lib/python3.8/site-packages/imageio/v2.py", line 359, in imread
with imopen(uri, "ri", **imopen_args) as file:
File "/usr/local/lib/python3.8/site-packages/imageio/core/imopen.py", line 196, in imopen
plugin_instance = candidate_plugin(request, **kwargs)
File "/usr/local/lib/python3.8/site-packages/imageio/plugins/pillow.py", line 104, in init
with Image.open(request.get_file()):
File "/usr/local/lib/python3.8/site-packages/PIL/Image.py", line 3133, in open
im = _open_core(fp, filename, prefix, formats)
File "/usr/local/lib/python3.8/site-packages/PIL/Image.py", line 3119, in _open_core
im = factory(fp, filename)
File "/usr/local/lib/python3.8/site-packages/PIL/ImageFile.py", line 116, in init
self._open()
File "/usr/local/lib/python3.8/site-packages/PIL/ImImagePlugin.py", line 153, in _open
s = s + self.fp.readline()
AttributeError: 'SeekableFileObject' object has no attribute 'readline'

@Pandede
Copy link
Contributor

Pandede commented Mar 3, 2024

Any minimum code which can reproduce this error?

@FranPuentes
Copy link

For example:

import imageio;

Cargar una imagen

info = imageio.v3.improps("https://imagenes.20minutos.es/files/image_1920_1080/uploads/imagenes/2022/09/09/fotografia-a-coruna.jpeg")
info

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

Successfully merging a pull request may close this issue.

3 participants