Thanks all, adding the 'rb' and 'wb' solved that test case.
The reason I read the file "the hard way" is that I'm testing why I
cannot unzip a buffer passed in a file upload using django.
While not actually using a file, pointing out the need for the binary
option gave me the clue I needed to up
Sells, Fred wrote:
> I'm tring to unzip a buffer that is uploaded to django/python. I can
> unzip the file in batch mode just fine, but when I get the buffer I get
> a "BadZipfile exception. I wrote this snippet to try to isolate the
> issue but I don't understand what's going on. I'm guessing
On 07/26/2011 08:42 AM, Sells, Fred wrote:
I'm tring to unzip a buffer that is uploaded to django/python. I can
unzip the file in batch mode just fine, but when I get the buffer I get
a "BadZipfile exception. I wrote this snippet to try to isolate the
issue but I don't understand what's going o
I'm tring to unzip a buffer that is uploaded to django/python. I can
unzip the file in batch mode just fine, but when I get the buffer I get
a "BadZipfile exception. I wrote this snippet to try to isolate the
issue but I don't understand what's going on. I'm guessing that I'm
losing some header/