fast-neural-style-pytorch icon indicating copy to clipboard operation
fast-neural-style-pytorch copied to clipboard

"AttributeError: can't set attribute"

Open mixuala opened this issue 5 years ago • 2 comments

This error (in Colaboratory) is fixed by upgrading the Pillow package, skip Pillow==4.1.1

/usr/local/lib/python3.6/dist-packages/PIL/JpegImagePlugin.py in SOF(self, marker)
    144     n = i16(self.fp.read(2))-2
    145     s = ImageFile._safe_read(self.fp, n)
--> 146     self.size = i16(s[3:]), i16(s[1:])
    147 
    148     self.bits = i8(s[0])

mixuala avatar Feb 06 '20 23:02 mixuala

I think you have to upgrade Pillow, for getting rid of this error. Nevertheless, I got other one not maybe related to this one, that points out some problems with the image you are trying to load (first time this ever happened to me)

osmarcedron avatar Mar 01 '20 11:03 osmarcedron

Hi @mixuala!

Seems like there's a problem with the earlier versions of Pillow. As @osmarcedron suggested, this problem could be solved by upgrading your Pillow to its latest version (i.e. pip install Pillow -U).

I will change all the notebooks to reflect this. Thanks for reporting this issue.

rrmina avatar Mar 06 '20 04:03 rrmina