开发者

ImageOps Module missing in PIL?

开发者 https://www.devze.com 2023-01-29 18:09 出处:网络
I am trying to save images in Django and getting the error \"The ImageOps module could not be imported\"

I am trying to save images in Django and getting the error "The ImageOps module could not be imported"

For some reason I am unable to import or use the ImageOps Module from PIL in the django shell. I have tried deleting the egg and reinstalling PIL but that doesn't work. I looked inside the egg and ImageOps.py is there and everything looks fine when I go inside of it.

Anybody know why I开发者_开发百科 would lose access to a single module like that?


The problem was being caused by django StdImageField. In site-packages/stdimage/fields.py line 71 I changed

from PIL import Image, ImageOps

to:

import Image, ImageOps

Now everything works fine.

0

精彩评论

暂无评论...
验证码 换一张
取 消