Issue 11872: cPickle gives strange error for large objects. (original) (raw)

Issue11872

Created on 2011-04-19 08:06 by meawoppl, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (4)
msg134017 - (view) Author: MattyG (meawoppl) Date: 2011-04-19 08:06
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/ in () 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/ in () 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.
msg134020 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2011-04-19 08:19
See also and .
msg188284 - (view) Author: Alexandre Vassalotti (alexandre.vassalotti) * (Python committer) Date: 2013-05-02 22:43
It is an integer overflow issue. It is easy to reproduce without numpy: $ python2.7 -c "import cPickle; cPickle.dumps('\x00' * 2**31)" Traceback (most recent call last): File "", line 1, in SystemError: error return without exception set We fixed this in Python 3. It may be worthwhile to fix cPickle as well.
msg247317 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2015-07-25 06:36
Is this issue still actual?
History
Date User Action Args
2022-04-11 14:57:16 admin set github: 56081
2015-11-26 17:37:34 serhiy.storchaka set status: pending -> closedresolution: out of datestage: needs patch -> resolved
2015-07-25 06:36:51 serhiy.storchaka set status: open -> pendingnosy: + serhiy.storchakamessages: +
2013-05-02 22:43:31 alexandre.vassalotti set nosy: + alexandre.vassalottimessages: + stage: needs patch
2011-04-26 17:40:35 santoso.wijaya set nosy: + santoso.wijaya
2011-04-26 15:02:01 xuanji set nosy: + xuanji
2011-04-19 08:19:54 amaury.forgeotdarc set nosy: + amaury.forgeotdarcmessages: +
2011-04-19 08:06:00 meawoppl create