Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #78200
| Newsgroups | comp.lang.python |
|---|---|
| Date | 2014-09-23 01:29 -0700 |
| Message-ID | <2bae5b6f-a3b9-40d8-a037-a6ff309ba71f@googlegroups.com> (permalink) |
| Subject | PIL can't read binary |
| From | Frank Liou <fk26541598fk@gmail.com> |
I use PIL Image.open()
but it show 'list' object has no attribute 'open'
this is my code
class Image2():
trans = connection.begin()
session = Session()
ProductId = session.query(ProductEntity.ProductId).filter(ProductEntity.CompanyId=="2").all()
Image = session.query(ProductImageGalleryEntity).filter(ProductImageGalleryEntity.ProductId=="20").all()
PicFromDataBase = Image[0].ProductImage
try:
b = Image.open(str(PicFromDataBase))
except Exception as e:
sad = e
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
PIL can't read binary Frank Liou <fk26541598fk@gmail.com> - 2014-09-23 01:29 -0700 Re: PIL can't read binary Chris Angelico <rosuav@gmail.com> - 2014-09-23 18:36 +1000 Re: PIL can't read binary Ned Batchelder <ned@nedbatchelder.com> - 2014-09-23 07:03 -0400
csiph-web