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

wand raises AttributeError in generate_thumbnail with S3Store #25

Closed
fuhrysteve opened this issue Dec 17, 2014 · 2 comments
Closed

wand raises AttributeError in generate_thumbnail with S3Store #25

fuhrysteve opened this issue Dec 17, 2014 · 2 comments

Comments

@fuhrysteve
Copy link

I haven't dug into this too terribly much, but I'm having an issue generating thumbnails using S3Store. I'll update later with more info if I can find it. Could be that this is a bug in wand, not sure yet... in any case, it seems like HTTPResponse is expected to be treated like a file like object, but wand seems to be trying to get attributes that HTTPResponse doesn't implement.

Here are the details:

picture.generate_thumbnail(width=320)
File "sqlalchemy_imageattach/entity.py", line 671, in generate_thumbnail
img = WandImage(file=f)
File "wand/image.py", line 1973, in __init__
self.read(file=file, resolution=resolution)
File "wand/image.py", line 2022, in read
fd = libc.fdopen(file.fileno(), file.mode)
AttributeError: 'HTTPResponse' object has no attribute 'mode'
Wand==0.3.8
SQLAlchemy-ImageAttach==0.8.2
Flask-SQLAlchemy==2.0
SQLAlchemy==0.9.8
Pillow==2.6.1
$ python --version                                                                                                                                         (12-17 15:45)
Python 3.4.0
@fuhrysteve
Copy link
Author

I believe this is a bug in wand, and I'm attempting to fix it upstream. Feel free to close this, otherwise I think I'll leave it open until it's resolved upstream..

@dahlia
Copy link
Owner

dahlia commented Dec 19, 2014

Fixed by emcconville/wand#205. Thanks!

@dahlia dahlia closed this as completed Dec 19, 2014
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