On Friday, October 7, 2016 at 1:05:43 PM UTC-4, Michael Torrie wrote:
> On 10/06/2016 10:46 AM, Tim wrote:
> > I need to zip up a directory that's about 400mb.
> > I'm using shutil.make_archive and I'm getting this response:
> > 
> >     Segmentation fault: 11 (core dumped)
> > 
> > The code is straightforward (and works on other, smaller dirs):
> > 
> >     shutil.make_archive(os.path.join(zip_dir, zname), 'zip', tgt_dir)
> > 
> > I guess I could drop the convenience of make_archive and use zipfile but 
> > that seems to be exactly what make_archive does.
> > 
> > I'm on FreeBSD, python2.7.
> > 
> > Anyone seen this before?
> 
> Does normal the normal zip utility crash also when trying to zip up this
> large directory?  I'm not familiar with how shutils.make_archive works,
> but since it's part of shutils, I suspect it's calling the zip command
> as a subprocess, rather than using the Python zip module.  Given the
> size of your directory I doubt the zip module would work anyway.
> 
> If the zip command works, you could just execute it using popen from
> within Python.

I'm now using subprocess and the zip command from FreeBSD, and it's working. So 
far I can't reproduce a small example of the problem with make_archive.
--Tim
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to