When I upload a PNG file and use PIL to handle it,there will be an
error occured:
'NoneType' object is unsubscriptable
I do not know why and other formats(BMP GIF JPG JPEG) are all ok.
The following is my code in my views.py:
f = request.FILES["imagefile"]
fileExt = (f.name).split(".")[-1].lowe
On Thu, Apr 9, 2009 at 11:15 AM, higer wrote:
>
> When I upload a PNG file and use PIL to handle it,there will be an
> error occured:
> 'NoneType' object is unsubscriptable
>
> I do not know why and other formats(BMP GIF JPG JPEG) are all ok.
> The following is my code in my views.py:
>
> f = re
I want to get a thumbnail version of the uploaded image,so I have to
use PIL to handle it.
But I do not know why that error occured.
We can know that the chafferer is either the Django or the PIL.
Then I wrote a .py script to handle images of different format ,all
goes well.The operations are the
On Apr 9, 12:45 am, higer wrote:
> When I upload a PNG file and use PIL to handle it,there will be an
> error occured:
> 'NoneType' object is unsubscriptable
>
> I do not know why and other formats(BMP GIF JPG JPEG) are all ok.
I don't know if this is your problem, but in order to use certain fi
Thanks for your suggestion. But Python 2.5 already has zlib moudle.
To png file,I wrote lines of code to save it first on disk and then
handled the saved copy,then that works.
I do not why there is some differencies between png file and file of
other formats.The following is my code:
Can anyone tell me why does this problem occur?
On Apr 12, 2:13 pm, higer wrote:
> Thanks for your suggestion. But Python 2.5 already has zlib moudle.
> To png file,I wrote lines of code to save it first on disk and then
> handled the saved copy,then that works.
> I do not why there is some diff
6 matches
Mail list logo