Python-1.5.2 cPickle

Thomas Wouters thomas at xs4all.net
Tue Aug 22 04:07:59 EDT 2000


On Tue, Aug 22, 2000 at 08:58:18AM +0100, Robin Becker wrote:
> In message <20000822010123.F4933 at xs4all.nl>, Thomas Wouters
> <thomas at xs4all.net> writes
> >On Mon, Aug 21, 2000 at 05:11:37PM +0100, Robin Becker wrote:
> >
> >> Is it correct behaviour for 1.5.2 cPickle to cause a fatal error just
> >> because say copy_reg is not available?
> >
> >What kind of fatal error ? An exception ? A SystemError ? A Segmentation
> >Violation ? cPickle needs the 'copy_reg' module; if you don't have it, it
> >won't work, but it should just raise an ImportError, not do anything bad or
> >anything. If you want to know why it needs the copy_reg module, try reading
> >the 'pickle' module (which is written in Python, a *lot* more readable than
> >C! :-)
> >

> C:\>python
> Python 1.5.2 (#0, Apr 13 1999, 10:51:12) [MSC 32 bit (Intel)] on win32
> Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
> >>> import cPickle
> "can't initialize module cPickle":
>         <class exceptions.ImportError at 8898c0>, 'No module named
> copy_reg'
> Fatal Python error: "can't initialize module cPickle"

Ah, yes, now I can reproduce this too, under regular 1.5.2. No, I don't
think this is acceptible. It's also already fixed in 2.0-CVS, at least, and
probably in 1.6 as well (don't have a 'real' 1.6 around to test.)

-- 
Thomas Wouters <thomas at xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!




More information about the Python-list mailing list