zipfile 2GB problems?

John Machin sjmachin at lexicon.net
Mon Jul 16 18:29:54 EDT 2007


On Jul 17, 7:37 am, xamdam <maxkhe... at gmail.com> wrote:
> On Jul 16, 3:39 pm, Steve Holden <st... at holdenweb.com> wrote:
>
>
>
> > xamdam wrote:
> > > On Jul 15, 5:39 pm, Steve Holden <st... at holdenweb.com> wrote:
> > >> xamdam wrote:
> > >>>>> Additional info: my file is from a data provider, do not know what
> > >>>>> they used to compress it. Previous files worked ok, this one is the
> > >>>>> 1st over 2GB. Winzip has no problem with it.
> > >>>> It could be you are using a Python with an in-built limit of 2GB on file
> > >>>> size. What happens if you open the file, seek past the 2GB point and
> > >>>> then try and read data?
> > >>> Steve,
> > >>> I used is_zipfile function, which from does exactly that from a quick
> > >>> read - goes to the end, reads expected string. It worked fine. Tried
> > >>> regular Windows 2.4.4 and 2.5.1, same result.
> > >> Fine, if it isn't file size limitations I suspect you need to post some
> > >> code and a traceback so we can get better insight into exactly what the
> > >> problem is.
>
> > > It's failing in the ZipFile constructor, which ends up throwing
>
> > > zipfile(2.4.3).py:291> raise BadZipfile, "Bad magic number for file
> > > header"
>
> > Well, that one bald line by itself certainly doesn't give *me* any
> > traction an what the problem might be. Getting information about this
> > problem is like (i.e. as difficult as) pulling teeth!
>
> > regards
> >   Steve
>
> Well, Steve, I don't know what else to tell you

"post some code and a traceback"

> I certainly do not
> want to cause you tooth ache!

I suspect that you are inducing unwanted symptoms at the *other* end
of Steve's alimentary canal.

> I was sort of hoping for some ZIP expert
> to go, 'oh, yeah'...

Hope all you want, but supply the information you are asked for.




More information about the Python-list mailing list