Umair Ahmed
Umair Ahmed

Reputation: 11694

Problems using PIL 1.1.7

The trivial

import Image
im = Image.OPEN('C:\abc.bmp')

results in the following exception

Traceback (most recent call last):
  File "<pyshell#1>", line 1, in <module>
    im = Image.OPEN('C:\Documents and Settings\umair.ahmed\My Documents\My Pictures\avanza.bmp')
TypeError: 'dict' object is not callable

not sure if i am missing something, kindly help.

Upvotes: 3

Views: 624

Answers (2)

Alok Singhal
Alok Singhal

Reputation: 96101

I don't think the error message came from your input, because the file names are different, but you should not use 'C:\abc.bmp', in your open() call, but use either C:/abc.bmp, or r'C:\abc.bmp'. Backslash is an escape character in Python.

Upvotes: 1

Derek Swingley
Derek Swingley

Reputation: 8752

Use:

Image.open()

It's case-sensitive.

Upvotes: 4

Related Questions