[New-bugs-announce] [issue11872] cPickle gives strange error for large objects.

MattyG report at bugs.python.org
Tue Apr 19 10:06:02 CEST 2011


New submission from MattyG <meawoppl at gmail.com>:

from numpy import *
import cPickle

a = zeros((300000, 1000)) 
f = open("test.pkl", "w") 
cPickle.dump(a, f)

------
SystemError: Traceback (most recent call last)

/home/kddcup/code/matt/svd-projection/take5/<ipython console> in <module>()

SystemError?: error return without exception set

Or using the .dump function:

a.dump("test.pkl")

SystemError? Traceback (most recent call last)

/home/kddcup/code/matt/svd-projection/take5/<ipython console> in <module>()

SystemError: NULL result without error in PyObject?_Call

I am not sure if this is a numpy or Pickle/cPickle glitch. In either case, even if this is a semi-known behavior, a more instructive error message would certainly help. I think the problem only happens for arrays larger than 2**(32-1) bytes but I would have to experiment more to be sure.

----------
components: Extension Modules
messages: 134017
nosy: meawoppl
priority: normal
severity: normal
status: open
title: cPickle gives strange error for large objects.
type: behavior
versions: Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11872>
_______________________________________


More information about the New-bugs-announce mailing list