--------------------------------------------------------------------------- PicklingError Traceback (most recent call last) in () ----> 1 cache.set('testing', cl) /usr/local/lib/python2.7/dist-packages/django/core/cache/backends/memcached.pyc in set(self, key, value, timeout, version) 87 def set(self, key, value, timeout=DEFAULT_TIMEOUT, version=None): 88 key = self.make_key(key, version=version) ---> 89 if not self._cache.set(key, value, self.get_backend_timeout(timeout)): 90 # make sure the key doesn't keep its old value in case of failure to set (memcached's 1MB limit) 91 self._cache.delete(key) /usr/lib/python2.7/dist-packages/memcache.pyc in set(self, key, val, time, min_compress_len) 649 650 ''' --> 651 return self._set("set", key, val, time, min_compress_len) 652 653 def cas(self, key, val, time=0, min_compress_len=0): /usr/lib/python2.7/dist-packages/memcache.pyc in _set(self, cmd, key, val, time, min_compress_len) 927 928 try: --> 929 return _unsafe_set() 930 except _ConnectionDeadError: 931 # retry once /usr/lib/python2.7/dist-packages/memcache.pyc in _unsafe_set() 900 self._statlog(cmd) 901 --> 902 store_info = self._val_to_store_info(val, min_compress_len) 903 if not store_info: 904 return(0) /usr/lib/python2.7/dist-packages/memcache.pyc in _val_to_store_info(self, val, min_compress_len) 868 if self.persistent_id: 869 pickler.persistent_id = self.persistent_id --> 870 pickler.dump(val) 871 val = file.getvalue() 872 /usr/lib/python2.7/pickle.pyc in dump(self, obj) 222 if self.proto >= 2: 223 self.write(PROTO + chr(self.proto)) --> 224 self.save(obj) 225 self.write(STOP) 226 /usr/lib/python2.7/pickle.pyc in save(self, obj) 329 330 # Save the reduce() output and finally memoize the object --> 331 self.save_reduce(obj=obj, *rv) 332 333 def persistent_id(self, obj): /usr/lib/python2.7/pickle.pyc in save_reduce(self, func, args, state, listitems, dictitems, obj) 417 418 if state is not None: --> 419 save(state) 420 write(BUILD) 421 /usr/lib/python2.7/pickle.pyc in save(self, obj) 284 f = self.dispatch.get(t) 285 if f: --> 286 f(self, obj) # Call unbound method with explicit self 287 return 288 /usr/lib/python2.7/pickle.pyc in save_dict(self, obj) 647 648 self.memoize(obj) --> 649 self._batch_setitems(obj.iteritems()) 650 651 dispatch[DictionaryType] = save_dict /usr/lib/python2.7/pickle.pyc in _batch_setitems(self, items) 679 for k, v in tmp: 680 save(k) --> 681 save(v) 682 write(SETITEMS) 683 elif n: /usr/lib/python2.7/pickle.pyc in save(self, obj) 329 330 # Save the reduce() output and finally memoize the object --> 331 self.save_reduce(obj=obj, *rv) 332 333 def persistent_id(self, obj): /usr/lib/python2.7/pickle.pyc in save_reduce(self, func, args, state, listitems, dictitems, obj) 417 418 if state is not None: --> 419 save(state) 420 write(BUILD) 421 /usr/lib/python2.7/pickle.pyc in save(self, obj) 284 f = self.dispatch.get(t) 285 if f: --> 286 f(self, obj) # Call unbound method with explicit self 287 return 288 /usr/lib/python2.7/pickle.pyc in save_dict(self, obj) 647 648 self.memoize(obj) --> 649 self._batch_setitems(obj.iteritems()) 650 651 dispatch[DictionaryType] = save_dict /usr/lib/python2.7/pickle.pyc in _batch_setitems(self, items) 679 for k, v in tmp: 680 save(k) --> 681 save(v) 682 write(SETITEMS) 683 elif n: /usr/lib/python2.7/pickle.pyc in save(self, obj) 284 f = self.dispatch.get(t) 285 if f: --> 286 f(self, obj) # Call unbound method with explicit self 287 return 288 /usr/lib/python2.7/pickle.pyc in save_dict(self, obj) 647 648 self.memoize(obj) --> 649 self._batch_setitems(obj.iteritems()) 650 651 dispatch[DictionaryType] = save_dict /usr/lib/python2.7/pickle.pyc in _batch_setitems(self, items) 679 for k, v in tmp: 680 save(k) --> 681 save(v) 682 write(SETITEMS) 683 elif n: /usr/lib/python2.7/pickle.pyc in save(self, obj) 329 330 # Save the reduce() output and finally memoize the object --> 331 self.save_reduce(obj=obj, *rv) 332 333 def persistent_id(self, obj): /usr/lib/python2.7/pickle.pyc in save_reduce(self, func, args, state, listitems, dictitems, obj) 417 418 if state is not None: --> 419 save(state) 420 write(BUILD) 421 /usr/lib/python2.7/pickle.pyc in save(self, obj) 284 f = self.dispatch.get(t) 285 if f: --> 286 f(self, obj) # Call unbound method with explicit self 287 return 288 /usr/lib/python2.7/pickle.pyc in save_dict(self, obj) 647 648 self.memoize(obj) --> 649 self._batch_setitems(obj.iteritems()) 650 651 dispatch[DictionaryType] = save_dict /usr/lib/python2.7/pickle.pyc in _batch_setitems(self, items) 679 for k, v in tmp: 680 save(k) --> 681 save(v) 682 write(SETITEMS) 683 elif n: /usr/lib/python2.7/pickle.pyc in save(self, obj) 329 330 # Save the reduce() output and finally memoize the object --> 331 self.save_reduce(obj=obj, *rv) 332 333 def persistent_id(self, obj): /usr/lib/python2.7/pickle.pyc in save_reduce(self, func, args, state, listitems, dictitems, obj) 417 418 if state is not None: --> 419 save(state) 420 write(BUILD) 421 /usr/lib/python2.7/pickle.pyc in save(self, obj) 284 f = self.dispatch.get(t) 285 if f: --> 286 f(self, obj) # Call unbound method with explicit self 287 return 288 /usr/lib/python2.7/pickle.pyc in save_dict(self, obj) 647 648 self.memoize(obj) --> 649 self._batch_setitems(obj.iteritems()) 650 651 dispatch[DictionaryType] = save_dict /usr/lib/python2.7/pickle.pyc in _batch_setitems(self, items) 679 for k, v in tmp: 680 save(k) --> 681 save(v) 682 write(SETITEMS) 683 elif n: /usr/lib/python2.7/pickle.pyc in save(self, obj) 329 330 # Save the reduce() output and finally memoize the object --> 331 self.save_reduce(obj=obj, *rv) 332 333 def persistent_id(self, obj): /usr/lib/python2.7/pickle.pyc in save_reduce(self, func, args, state, listitems, dictitems, obj) 417 418 if state is not None: --> 419 save(state) 420 write(BUILD) 421 /usr/lib/python2.7/pickle.pyc in save(self, obj) 284 f = self.dispatch.get(t) 285 if f: --> 286 f(self, obj) # Call unbound method with explicit self 287 return 288 /usr/lib/python2.7/pickle.pyc in save_dict(self, obj) 647 648 self.memoize(obj) --> 649 self._batch_setitems(obj.iteritems()) 650 651 dispatch[DictionaryType] = save_dict /usr/lib/python2.7/pickle.pyc in _batch_setitems(self, items) 679 for k, v in tmp: 680 save(k) --> 681 save(v) 682 write(SETITEMS) 683 elif n: /usr/lib/python2.7/pickle.pyc in save(self, obj) 329 330 # Save the reduce() output and finally memoize the object --> 331 self.save_reduce(obj=obj, *rv) 332 333 def persistent_id(self, obj): /usr/lib/python2.7/pickle.pyc in save_reduce(self, func, args, state, listitems, dictitems, obj) 417 418 if state is not None: --> 419 save(state) 420 write(BUILD) 421 /usr/lib/python2.7/pickle.pyc in save(self, obj) 284 f = self.dispatch.get(t) 285 if f: --> 286 f(self, obj) # Call unbound method with explicit self 287 return 288 /usr/lib/python2.7/pickle.pyc in save_dict(self, obj) 647 648 self.memoize(obj) --> 649 self._batch_setitems(obj.iteritems()) 650 651 dispatch[DictionaryType] = save_dict /usr/lib/python2.7/pickle.pyc in _batch_setitems(self, items) 679 for k, v in tmp: 680 save(k) --> 681 save(v) 682 write(SETITEMS) 683 elif n: /usr/lib/python2.7/pickle.pyc in save(self, obj) 329 330 # Save the reduce() output and finally memoize the object --> 331 self.save_reduce(obj=obj, *rv) 332 333 def persistent_id(self, obj): /usr/lib/python2.7/pickle.pyc in save_reduce(self, func, args, state, listitems, dictitems, obj) 399 else: 400 save(func) --> 401 save(args) 402 write(REDUCE) 403 /usr/lib/python2.7/pickle.pyc in save(self, obj) 284 f = self.dispatch.get(t) 285 if f: --> 286 f(self, obj) # Call unbound method with explicit self 287 return 288 /usr/lib/python2.7/pickle.pyc in save_tuple(self, obj) 546 if n <= 3 and proto >= 2: 547 for element in obj: --> 548 save(element) 549 # Subtle. Same as in the big comment below. 550 if id(obj) in memo: /usr/lib/python2.7/pickle.pyc in save(self, obj) 284 f = self.dispatch.get(t) 285 if f: --> 286 f(self, obj) # Call unbound method with explicit self 287 return 288 /usr/lib/python2.7/pickle.pyc in save_list(self, obj) 598 599 self.memoize(obj) --> 600 self._batch_appends(iter(obj)) 601 602 dispatch[ListType] = save_list /usr/lib/python2.7/pickle.pyc in _batch_appends(self, items) 631 write(MARK) 632 for x in tmp: --> 633 save(x) 634 write(APPENDS) 635 elif n: /usr/lib/python2.7/pickle.pyc in save(self, obj) 284 f = self.dispatch.get(t) 285 if f: --> 286 f(self, obj) # Call unbound method with explicit self 287 return 288 /usr/lib/python2.7/pickle.pyc in save_list(self, obj) 598 599 self.memoize(obj) --> 600 self._batch_appends(iter(obj)) 601 602 dispatch[ListType] = save_list /usr/lib/python2.7/pickle.pyc in _batch_appends(self, items) 631 write(MARK) 632 for x in tmp: --> 633 save(x) 634 write(APPENDS) 635 elif n: /usr/lib/python2.7/pickle.pyc in save(self, obj) 329 330 # Save the reduce() output and finally memoize the object --> 331 self.save_reduce(obj=obj, *rv) 332 333 def persistent_id(self, obj): /usr/lib/python2.7/pickle.pyc in save_reduce(self, func, args, state, listitems, dictitems, obj) 417 418 if state is not None: --> 419 save(state) 420 write(BUILD) 421 /usr/lib/python2.7/pickle.pyc in save(self, obj) 284 f = self.dispatch.get(t) 285 if f: --> 286 f(self, obj) # Call unbound method with explicit self 287 return 288 /usr/lib/python2.7/pickle.pyc in save_dict(self, obj) 647 648 self.memoize(obj) --> 649 self._batch_setitems(obj.iteritems()) 650 651 dispatch[DictionaryType] = save_dict /usr/lib/python2.7/pickle.pyc in _batch_setitems(self, items) 679 for k, v in tmp: 680 save(k) --> 681 save(v) 682 write(SETITEMS) 683 elif n: /usr/lib/python2.7/pickle.pyc in save(self, obj) 329 330 # Save the reduce() output and finally memoize the object --> 331 self.save_reduce(obj=obj, *rv) 332 333 def persistent_id(self, obj): /usr/lib/python2.7/pickle.pyc in save_reduce(self, func, args, state, listitems, dictitems, obj) 394 "args[0] from __newobj__ args has the wrong class") 395 args = args[1:] --> 396 save(cls) 397 save(args) 398 write(NEWOBJ) /usr/lib/python2.7/pickle.pyc in save(self, obj) 284 f = self.dispatch.get(t) 285 if f: --> 286 f(self, obj) # Call unbound method with explicit self 287 return 288 /usr/lib/python2.7/pickle.pyc in save_global(self, obj, name, pack) 746 raise PicklingError( 747 "Can't pickle %r: it's not found as %s.%s" % --> 748 (obj, module, name)) 749 else: 750 if klass is not obj: PicklingError: Can't pickle : it's not found as __builtin__.module