Fail dump of <class 'boto.jsonresponse.Element'> with pickle #1774

Open
rombr opened this Issue Oct 8, 2013 · 0 comments

Projects

None yet

1 participant

@rombr
rombr commented Oct 8, 2013

Python 2.7.3
boto==2.13.3

When I try to dump data of type <class 'boto.jsonresponse.Element'> with pickle module, I get error.

My example:

print data
{u'Complaints': u'0', u'Timestamp': datetime.datetime(2013, 9, 27, 15, 59, tzinfo=<DstTzInfo 'Europe/Moscow' MSK+4:00:00 STD>), u'DeliveryAttempts': u'3', u'Bounces': u'0', u'Rejects': u'0'}
type(data)
<class 'boto.jsonresponse.Element'>

import pickle
pickle.dumps(data)
File "/usr/lib/python2.7/pickle.py", line 331, in save
self.save_reduce(obj=obj, *rv)
File "/usr/lib/python2.7/pickle.py", line 401, in save_reduce
save(args)
File "/usr/lib/python2.7/pickle.py", line 286, in save
f(self, obj) # Call unbound method with explicit self
File "/usr/lib/python2.7/pickle.py", line 562, in save_tuple
save(element)
File "/usr/lib/python2.7/pickle.py", line 286, in save
f(self, obj) # Call unbound method with explicit self
File "/usr/lib/python2.7/pickle.py", line 649, in save_dict
self._batch_setitems(obj.iteritems())
File "/usr/lib/python2.7/pickle.py", line 663, in _batch_setitems
save(v)
File "/usr/lib/python2.7/pickle.py", line 331, in save
self.save_reduce(obj=obj, *rv)
File "/usr/lib/python2.7/pickle.py", line 401, in save_reduce
save(args)
File "/usr/lib/python2.7/pickle.py", line 286, in save
f(self, obj) # Call unbound method with explicit self
File "/usr/lib/python2.7/pickle.py", line 562, in save_tuple
save(element)
File "/usr/lib/python2.7/pickle.py", line 286, in save
f(self, obj) # Call unbound method with explicit self
File "/usr/lib/python2.7/pickle.py", line 489, in save_string
self.memoize(obj)
RuntimeError: maximum recursion depth exceeded

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment