image = Image.open(self.imageBuffer)
> IOError: cannot identify image file
>
> The error occurs when trying to open the imageBuffer so I can work with the
> data in the buffer. What have I missed?
You need to rewind to the start of the buffer before trying to read from it:
fp, length)
if len(s) != length:
raise IOError
# rest of function unchanged
(Note that I've had to change the argument name "len" to "length" to avoid
shadowing the built-in.)
RELATED BUGS
I have not attempted to make test cases