You have a namespace conflict. One of your import statements masks PIL.Image (which is a module, not a class) with some class called Image .
Instead...
from PIL import Image
try ...
import PIL.Image
and then in your code ...
fp = open("/pdf-ex/downloadwin7.png","rb") img = PIL.Image.open(fp) img.show()
When dealing with large amounts of imports, be careful with namespace conflicts. In general, I am very careful about the statements from some_module import * .
Good luck with your project and happy coding.
parselmouth
source share