BadZipfile "file is not a zip file"

Chris Mellon arkanes at gmail.com
Mon Jan 12 17:53:26 CET 2009


On Sat, Jan 10, 2009 at 1:32 PM, webcomm <ryandw at gmail.com> wrote:
> On Jan 9, 7:33 pm, John Machin <sjmac... at lexicon.net> wrote:
>> It is not impossible for a file with dummy data to have been
>> handcrafted or otherwise produced by a process different to that used
>> for a real-data file.
>
> I knew it was produced by the same process, or I wouldn't have shared
> it. : )
> But you couldn't have known that.
>
>
>> > Not sure if you've seen this thread...http://groups.google.com/group/comp.lang.python/browse_thread/thread/...
>>
>> Yeah, I've seen it ... (sigh) ... pax Steve Holden, but *please* stick
>> with one thread ...
>
> Thanks... I thought I was posting about separate issues and would
> annoy people who were only interested in one of the issues if I put
> them both in the same thread.  I guess all posts re: the same script
> should go in one thread, even if the questions posed may be unrelated
> and may be separate issues.  There are grey areas.
>
> Problem solved in John Machin's post at
> http://groups.google.com/group/comp.lang.python/browse_thread/thread/d84f42493fe81864/03b8341539d87989?hl=en&lnk=raot#03b8341539d87989
>


It's worth pointing out (although the provider probably doesn't care)
that this isn't really an XML document and this was a bad way of them
to distribute the data. If they'd used a correctly formatted XML
document (with the prelude and everything) with the correct encoding
information, existing XML parsers should have just Done The Right
Thing with the data, instead of you needing to know the encoding a
priori to extract an XML fragment.



More information about the Python-list mailing list