Bugs item #1693079, was opened at 2007-04-02 11:19 Message generated for change (Settings changed) made by rhettinger You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1693079&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Library Group: Python 2.5 Status: Open Resolution: None Priority: 5 Private: No Submitted By: IWL (iwl) >Assigned to: Raymond Hettinger (rhettinger) Summary: Can't save empty array in shelve Initial Comment: iwl wrote: > I've tryed to save some data containing empty arrays (array('f')) in a > shelve. > It looks like the shelve has some problems with empty arrays, get > allways: > TypeError: ("'NoneType' object is not iterable", <type 'array.array'>, > ('f', None))- > Messages when dealing with the readed back shelve. > Seems like I have to avoid empty arrays in a shelve. That seems to be a bug in the underlying pickling mechanism: >>> from array import array >>> from cPickle import loads, dumps >>> loads(dumps(array("f", [1]))) array('f', [1.0]) >>> loads(dumps(array("f"))) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: ("'NoneType' object is not iterable", <type 'array.array'>, ('f', None)) Please submit a bug report. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1693079&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com