| 1 |
|
|---|
| 2 | ---------------------------------------------------------------------------
|
|---|
| 3 | PicklingError Traceback (most recent call last)
|
|---|
| 4 | <ipython-input-6-22ca9d6fd0c9> in <module>()
|
|---|
| 5 | ----> 1 cache.set('testing', cl)
|
|---|
| 6 |
|
|---|
| 7 | /usr/local/lib/python2.7/dist-packages/django/core/cache/backends/memcached.pyc in set(self, key, value, timeout, version)
|
|---|
| 8 | 87 def set(self, key, value, timeout=DEFAULT_TIMEOUT, version=None):
|
|---|
| 9 | 88 key = self.make_key(key, version=version)
|
|---|
| 10 | ---> 89 if not self._cache.set(key, value, self.get_backend_timeout(timeout)):
|
|---|
| 11 | 90 # make sure the key doesn't keep its old value in case of failure to set (memcached's 1MB limit)
|
|---|
| 12 | 91 self._cache.delete(key)
|
|---|
| 13 |
|
|---|
| 14 | /usr/lib/python2.7/dist-packages/memcache.pyc in set(self, key, val, time, min_compress_len)
|
|---|
| 15 | 649
|
|---|
| 16 | 650 '''
|
|---|
| 17 | --> 651 return self._set("set", key, val, time, min_compress_len)
|
|---|
| 18 | 652
|
|---|
| 19 | 653 def cas(self, key, val, time=0, min_compress_len=0):
|
|---|
| 20 |
|
|---|
| 21 | /usr/lib/python2.7/dist-packages/memcache.pyc in _set(self, cmd, key, val, time, min_compress_len)
|
|---|
| 22 | 927
|
|---|
| 23 | 928 try:
|
|---|
| 24 | --> 929 return _unsafe_set()
|
|---|
| 25 | 930 except _ConnectionDeadError:
|
|---|
| 26 | 931 # retry once
|
|---|
| 27 |
|
|---|
| 28 | /usr/lib/python2.7/dist-packages/memcache.pyc in _unsafe_set()
|
|---|
| 29 | 900 self._statlog(cmd)
|
|---|
| 30 | 901
|
|---|
| 31 | --> 902 store_info = self._val_to_store_info(val, min_compress_len)
|
|---|
| 32 | 903 if not store_info:
|
|---|
| 33 | 904 return(0)
|
|---|
| 34 |
|
|---|
| 35 | /usr/lib/python2.7/dist-packages/memcache.pyc in _val_to_store_info(self, val, min_compress_len)
|
|---|
| 36 | 868 if self.persistent_id:
|
|---|
| 37 | 869 pickler.persistent_id = self.persistent_id
|
|---|
| 38 | --> 870 pickler.dump(val)
|
|---|
| 39 | 871 val = file.getvalue()
|
|---|
| 40 | 872
|
|---|
| 41 |
|
|---|
| 42 | /usr/lib/python2.7/pickle.pyc in dump(self, obj)
|
|---|
| 43 | 222 if self.proto >= 2:
|
|---|
| 44 | 223 self.write(PROTO + chr(self.proto))
|
|---|
| 45 | --> 224 self.save(obj)
|
|---|
| 46 | 225 self.write(STOP)
|
|---|
| 47 | 226
|
|---|
| 48 |
|
|---|
| 49 | /usr/lib/python2.7/pickle.pyc in save(self, obj)
|
|---|
| 50 | 329
|
|---|
| 51 | 330 # Save the reduce() output and finally memoize the object
|
|---|
| 52 | --> 331 self.save_reduce(obj=obj, *rv)
|
|---|
| 53 | 332
|
|---|
| 54 | 333 def persistent_id(self, obj):
|
|---|
| 55 |
|
|---|
| 56 | /usr/lib/python2.7/pickle.pyc in save_reduce(self, func, args, state, listitems, dictitems, obj)
|
|---|
| 57 | 417
|
|---|
| 58 | 418 if state is not None:
|
|---|
| 59 | --> 419 save(state)
|
|---|
| 60 | 420 write(BUILD)
|
|---|
| 61 | 421
|
|---|
| 62 |
|
|---|
| 63 | /usr/lib/python2.7/pickle.pyc in save(self, obj)
|
|---|
| 64 | 284 f = self.dispatch.get(t)
|
|---|
| 65 | 285 if f:
|
|---|
| 66 | --> 286 f(self, obj) # Call unbound method with explicit self
|
|---|
| 67 | 287 return
|
|---|
| 68 | 288
|
|---|
| 69 |
|
|---|
| 70 | /usr/lib/python2.7/pickle.pyc in save_dict(self, obj)
|
|---|
| 71 | 647
|
|---|
| 72 | 648 self.memoize(obj)
|
|---|
| 73 | --> 649 self._batch_setitems(obj.iteritems())
|
|---|
| 74 | 650
|
|---|
| 75 | 651 dispatch[DictionaryType] = save_dict
|
|---|
| 76 |
|
|---|
| 77 | /usr/lib/python2.7/pickle.pyc in _batch_setitems(self, items)
|
|---|
| 78 | 679 for k, v in tmp:
|
|---|
| 79 | 680 save(k)
|
|---|
| 80 | --> 681 save(v)
|
|---|
| 81 | 682 write(SETITEMS)
|
|---|
| 82 | 683 elif n:
|
|---|
| 83 |
|
|---|
| 84 | /usr/lib/python2.7/pickle.pyc in save(self, obj)
|
|---|
| 85 | 329
|
|---|
| 86 | 330 # Save the reduce() output and finally memoize the object
|
|---|
| 87 | --> 331 self.save_reduce(obj=obj, *rv)
|
|---|
| 88 | 332
|
|---|
| 89 | 333 def persistent_id(self, obj):
|
|---|
| 90 |
|
|---|
| 91 | /usr/lib/python2.7/pickle.pyc in save_reduce(self, func, args, state, listitems, dictitems, obj)
|
|---|
| 92 | 417
|
|---|
| 93 | 418 if state is not None:
|
|---|
| 94 | --> 419 save(state)
|
|---|
| 95 | 420 write(BUILD)
|
|---|
| 96 | 421
|
|---|
| 97 |
|
|---|
| 98 | /usr/lib/python2.7/pickle.pyc in save(self, obj)
|
|---|
| 99 | 284 f = self.dispatch.get(t)
|
|---|
| 100 | 285 if f:
|
|---|
| 101 | --> 286 f(self, obj) # Call unbound method with explicit self
|
|---|
| 102 | 287 return
|
|---|
| 103 | 288
|
|---|
| 104 |
|
|---|
| 105 | /usr/lib/python2.7/pickle.pyc in save_dict(self, obj)
|
|---|
| 106 | 647
|
|---|
| 107 | 648 self.memoize(obj)
|
|---|
| 108 | --> 649 self._batch_setitems(obj.iteritems())
|
|---|
| 109 | 650
|
|---|
| 110 | 651 dispatch[DictionaryType] = save_dict
|
|---|
| 111 |
|
|---|
| 112 | /usr/lib/python2.7/pickle.pyc in _batch_setitems(self, items)
|
|---|
| 113 | 679 for k, v in tmp:
|
|---|
| 114 | 680 save(k)
|
|---|
| 115 | --> 681 save(v)
|
|---|
| 116 | 682 write(SETITEMS)
|
|---|
| 117 | 683 elif n:
|
|---|
| 118 |
|
|---|
| 119 | /usr/lib/python2.7/pickle.pyc in save(self, obj)
|
|---|
| 120 | 284 f = self.dispatch.get(t)
|
|---|
| 121 | 285 if f:
|
|---|
| 122 | --> 286 f(self, obj) # Call unbound method with explicit self
|
|---|
| 123 | 287 return
|
|---|
| 124 | 288
|
|---|
| 125 |
|
|---|
| 126 | /usr/lib/python2.7/pickle.pyc in save_dict(self, obj)
|
|---|
| 127 | 647
|
|---|
| 128 | 648 self.memoize(obj)
|
|---|
| 129 | --> 649 self._batch_setitems(obj.iteritems())
|
|---|
| 130 | 650
|
|---|
| 131 | 651 dispatch[DictionaryType] = save_dict
|
|---|
| 132 |
|
|---|
| 133 | /usr/lib/python2.7/pickle.pyc in _batch_setitems(self, items)
|
|---|
| 134 | 679 for k, v in tmp:
|
|---|
| 135 | 680 save(k)
|
|---|
| 136 | --> 681 save(v)
|
|---|
| 137 | 682 write(SETITEMS)
|
|---|
| 138 | 683 elif n:
|
|---|
| 139 |
|
|---|
| 140 | /usr/lib/python2.7/pickle.pyc in save(self, obj)
|
|---|
| 141 | 329
|
|---|
| 142 | 330 # Save the reduce() output and finally memoize the object
|
|---|
| 143 | --> 331 self.save_reduce(obj=obj, *rv)
|
|---|
| 144 | 332
|
|---|
| 145 | 333 def persistent_id(self, obj):
|
|---|
| 146 |
|
|---|
| 147 | /usr/lib/python2.7/pickle.pyc in save_reduce(self, func, args, state, listitems, dictitems, obj)
|
|---|
| 148 | 417
|
|---|
| 149 | 418 if state is not None:
|
|---|
| 150 | --> 419 save(state)
|
|---|
| 151 | 420 write(BUILD)
|
|---|
| 152 | 421
|
|---|
| 153 |
|
|---|
| 154 | /usr/lib/python2.7/pickle.pyc in save(self, obj)
|
|---|
| 155 | 284 f = self.dispatch.get(t)
|
|---|
| 156 | 285 if f:
|
|---|
| 157 | --> 286 f(self, obj) # Call unbound method with explicit self
|
|---|
| 158 | 287 return
|
|---|
| 159 | 288
|
|---|
| 160 |
|
|---|
| 161 | /usr/lib/python2.7/pickle.pyc in save_dict(self, obj)
|
|---|
| 162 | 647
|
|---|
| 163 | 648 self.memoize(obj)
|
|---|
| 164 | --> 649 self._batch_setitems(obj.iteritems())
|
|---|
| 165 | 650
|
|---|
| 166 | 651 dispatch[DictionaryType] = save_dict
|
|---|
| 167 |
|
|---|
| 168 | /usr/lib/python2.7/pickle.pyc in _batch_setitems(self, items)
|
|---|
| 169 | 679 for k, v in tmp:
|
|---|
| 170 | 680 save(k)
|
|---|
| 171 | --> 681 save(v)
|
|---|
| 172 | 682 write(SETITEMS)
|
|---|
| 173 | 683 elif n:
|
|---|
| 174 |
|
|---|
| 175 | /usr/lib/python2.7/pickle.pyc in save(self, obj)
|
|---|
| 176 | 329
|
|---|
| 177 | 330 # Save the reduce() output and finally memoize the object
|
|---|
| 178 | --> 331 self.save_reduce(obj=obj, *rv)
|
|---|
| 179 | 332
|
|---|
| 180 | 333 def persistent_id(self, obj):
|
|---|
| 181 |
|
|---|
| 182 | /usr/lib/python2.7/pickle.pyc in save_reduce(self, func, args, state, listitems, dictitems, obj)
|
|---|
| 183 | 417
|
|---|
| 184 | 418 if state is not None:
|
|---|
| 185 | --> 419 save(state)
|
|---|
| 186 | 420 write(BUILD)
|
|---|
| 187 | 421
|
|---|
| 188 |
|
|---|
| 189 | /usr/lib/python2.7/pickle.pyc in save(self, obj)
|
|---|
| 190 | 284 f = self.dispatch.get(t)
|
|---|
| 191 | 285 if f:
|
|---|
| 192 | --> 286 f(self, obj) # Call unbound method with explicit self
|
|---|
| 193 | 287 return
|
|---|
| 194 | 288
|
|---|
| 195 |
|
|---|
| 196 | /usr/lib/python2.7/pickle.pyc in save_dict(self, obj)
|
|---|
| 197 | 647
|
|---|
| 198 | 648 self.memoize(obj)
|
|---|
| 199 | --> 649 self._batch_setitems(obj.iteritems())
|
|---|
| 200 | 650
|
|---|
| 201 | 651 dispatch[DictionaryType] = save_dict
|
|---|
| 202 |
|
|---|
| 203 | /usr/lib/python2.7/pickle.pyc in _batch_setitems(self, items)
|
|---|
| 204 | 679 for k, v in tmp:
|
|---|
| 205 | 680 save(k)
|
|---|
| 206 | --> 681 save(v)
|
|---|
| 207 | 682 write(SETITEMS)
|
|---|
| 208 | 683 elif n:
|
|---|
| 209 |
|
|---|
| 210 | /usr/lib/python2.7/pickle.pyc in save(self, obj)
|
|---|
| 211 | 329
|
|---|
| 212 | 330 # Save the reduce() output and finally memoize the object
|
|---|
| 213 | --> 331 self.save_reduce(obj=obj, *rv)
|
|---|
| 214 | 332
|
|---|
| 215 | 333 def persistent_id(self, obj):
|
|---|
| 216 |
|
|---|
| 217 | /usr/lib/python2.7/pickle.pyc in save_reduce(self, func, args, state, listitems, dictitems, obj)
|
|---|
| 218 | 417
|
|---|
| 219 | 418 if state is not None:
|
|---|
| 220 | --> 419 save(state)
|
|---|
| 221 | 420 write(BUILD)
|
|---|
| 222 | 421
|
|---|
| 223 |
|
|---|
| 224 | /usr/lib/python2.7/pickle.pyc in save(self, obj)
|
|---|
| 225 | 284 f = self.dispatch.get(t)
|
|---|
| 226 | 285 if f:
|
|---|
| 227 | --> 286 f(self, obj) # Call unbound method with explicit self
|
|---|
| 228 | 287 return
|
|---|
| 229 | 288
|
|---|
| 230 |
|
|---|
| 231 | /usr/lib/python2.7/pickle.pyc in save_dict(self, obj)
|
|---|
| 232 | 647
|
|---|
| 233 | 648 self.memoize(obj)
|
|---|
| 234 | --> 649 self._batch_setitems(obj.iteritems())
|
|---|
| 235 | 650
|
|---|
| 236 | 651 dispatch[DictionaryType] = save_dict
|
|---|
| 237 |
|
|---|
| 238 | /usr/lib/python2.7/pickle.pyc in _batch_setitems(self, items)
|
|---|
| 239 | 679 for k, v in tmp:
|
|---|
| 240 | 680 save(k)
|
|---|
| 241 | --> 681 save(v)
|
|---|
| 242 | 682 write(SETITEMS)
|
|---|
| 243 | 683 elif n:
|
|---|
| 244 |
|
|---|
| 245 | /usr/lib/python2.7/pickle.pyc in save(self, obj)
|
|---|
| 246 | 329
|
|---|
| 247 | 330 # Save the reduce() output and finally memoize the object
|
|---|
| 248 | --> 331 self.save_reduce(obj=obj, *rv)
|
|---|
| 249 | 332
|
|---|
| 250 | 333 def persistent_id(self, obj):
|
|---|
| 251 |
|
|---|
| 252 | /usr/lib/python2.7/pickle.pyc in save_reduce(self, func, args, state, listitems, dictitems, obj)
|
|---|
| 253 | 417
|
|---|
| 254 | 418 if state is not None:
|
|---|
| 255 | --> 419 save(state)
|
|---|
| 256 | 420 write(BUILD)
|
|---|
| 257 | 421
|
|---|
| 258 |
|
|---|
| 259 | /usr/lib/python2.7/pickle.pyc in save(self, obj)
|
|---|
| 260 | 284 f = self.dispatch.get(t)
|
|---|
| 261 | 285 if f:
|
|---|
| 262 | --> 286 f(self, obj) # Call unbound method with explicit self
|
|---|
| 263 | 287 return
|
|---|
| 264 | 288
|
|---|
| 265 |
|
|---|
| 266 | /usr/lib/python2.7/pickle.pyc in save_dict(self, obj)
|
|---|
| 267 | 647
|
|---|
| 268 | 648 self.memoize(obj)
|
|---|
| 269 | --> 649 self._batch_setitems(obj.iteritems())
|
|---|
| 270 | 650
|
|---|
| 271 | 651 dispatch[DictionaryType] = save_dict
|
|---|
| 272 |
|
|---|
| 273 | /usr/lib/python2.7/pickle.pyc in _batch_setitems(self, items)
|
|---|
| 274 | 679 for k, v in tmp:
|
|---|
| 275 | 680 save(k)
|
|---|
| 276 | --> 681 save(v)
|
|---|
| 277 | 682 write(SETITEMS)
|
|---|
| 278 | 683 elif n:
|
|---|
| 279 |
|
|---|
| 280 | /usr/lib/python2.7/pickle.pyc in save(self, obj)
|
|---|
| 281 | 329
|
|---|
| 282 | 330 # Save the reduce() output and finally memoize the object
|
|---|
| 283 | --> 331 self.save_reduce(obj=obj, *rv)
|
|---|
| 284 | 332
|
|---|
| 285 | 333 def persistent_id(self, obj):
|
|---|
| 286 |
|
|---|
| 287 | /usr/lib/python2.7/pickle.pyc in save_reduce(self, func, args, state, listitems, dictitems, obj)
|
|---|
| 288 | 399 else:
|
|---|
| 289 | 400 save(func)
|
|---|
| 290 | --> 401 save(args)
|
|---|
| 291 | 402 write(REDUCE)
|
|---|
| 292 | 403
|
|---|
| 293 |
|
|---|
| 294 | /usr/lib/python2.7/pickle.pyc in save(self, obj)
|
|---|
| 295 | 284 f = self.dispatch.get(t)
|
|---|
| 296 | 285 if f:
|
|---|
| 297 | --> 286 f(self, obj) # Call unbound method with explicit self
|
|---|
| 298 | 287 return
|
|---|
| 299 | 288
|
|---|
| 300 |
|
|---|
| 301 | /usr/lib/python2.7/pickle.pyc in save_tuple(self, obj)
|
|---|
| 302 | 546 if n <= 3 and proto >= 2:
|
|---|
| 303 | 547 for element in obj:
|
|---|
| 304 | --> 548 save(element)
|
|---|
| 305 | 549 # Subtle. Same as in the big comment below.
|
|---|
| 306 | 550 if id(obj) in memo:
|
|---|
| 307 |
|
|---|
| 308 | /usr/lib/python2.7/pickle.pyc in save(self, obj)
|
|---|
| 309 | 284 f = self.dispatch.get(t)
|
|---|
| 310 | 285 if f:
|
|---|
| 311 | --> 286 f(self, obj) # Call unbound method with explicit self
|
|---|
| 312 | 287 return
|
|---|
| 313 | 288
|
|---|
| 314 |
|
|---|
| 315 | /usr/lib/python2.7/pickle.pyc in save_list(self, obj)
|
|---|
| 316 | 598
|
|---|
| 317 | 599 self.memoize(obj)
|
|---|
| 318 | --> 600 self._batch_appends(iter(obj))
|
|---|
| 319 | 601
|
|---|
| 320 | 602 dispatch[ListType] = save_list
|
|---|
| 321 |
|
|---|
| 322 | /usr/lib/python2.7/pickle.pyc in _batch_appends(self, items)
|
|---|
| 323 | 631 write(MARK)
|
|---|
| 324 | 632 for x in tmp:
|
|---|
| 325 | --> 633 save(x)
|
|---|
| 326 | 634 write(APPENDS)
|
|---|
| 327 | 635 elif n:
|
|---|
| 328 |
|
|---|
| 329 | /usr/lib/python2.7/pickle.pyc in save(self, obj)
|
|---|
| 330 | 284 f = self.dispatch.get(t)
|
|---|
| 331 | 285 if f:
|
|---|
| 332 | --> 286 f(self, obj) # Call unbound method with explicit self
|
|---|
| 333 | 287 return
|
|---|
| 334 | 288
|
|---|
| 335 |
|
|---|
| 336 | /usr/lib/python2.7/pickle.pyc in save_list(self, obj)
|
|---|
| 337 | 598
|
|---|
| 338 | 599 self.memoize(obj)
|
|---|
| 339 | --> 600 self._batch_appends(iter(obj))
|
|---|
| 340 | 601
|
|---|
| 341 | 602 dispatch[ListType] = save_list
|
|---|
| 342 |
|
|---|
| 343 | /usr/lib/python2.7/pickle.pyc in _batch_appends(self, items)
|
|---|
| 344 | 631 write(MARK)
|
|---|
| 345 | 632 for x in tmp:
|
|---|
| 346 | --> 633 save(x)
|
|---|
| 347 | 634 write(APPENDS)
|
|---|
| 348 | 635 elif n:
|
|---|
| 349 |
|
|---|
| 350 | /usr/lib/python2.7/pickle.pyc in save(self, obj)
|
|---|
| 351 | 329
|
|---|
| 352 | 330 # Save the reduce() output and finally memoize the object
|
|---|
| 353 | --> 331 self.save_reduce(obj=obj, *rv)
|
|---|
| 354 | 332
|
|---|
| 355 | 333 def persistent_id(self, obj):
|
|---|
| 356 |
|
|---|
| 357 | /usr/lib/python2.7/pickle.pyc in save_reduce(self, func, args, state, listitems, dictitems, obj)
|
|---|
| 358 | 417
|
|---|
| 359 | 418 if state is not None:
|
|---|
| 360 | --> 419 save(state)
|
|---|
| 361 | 420 write(BUILD)
|
|---|
| 362 | 421
|
|---|
| 363 |
|
|---|
| 364 | /usr/lib/python2.7/pickle.pyc in save(self, obj)
|
|---|
| 365 | 284 f = self.dispatch.get(t)
|
|---|
| 366 | 285 if f:
|
|---|
| 367 | --> 286 f(self, obj) # Call unbound method with explicit self
|
|---|
| 368 | 287 return
|
|---|
| 369 | 288
|
|---|
| 370 |
|
|---|
| 371 | /usr/lib/python2.7/pickle.pyc in save_dict(self, obj)
|
|---|
| 372 | 647
|
|---|
| 373 | 648 self.memoize(obj)
|
|---|
| 374 | --> 649 self._batch_setitems(obj.iteritems())
|
|---|
| 375 | 650
|
|---|
| 376 | 651 dispatch[DictionaryType] = save_dict
|
|---|
| 377 |
|
|---|
| 378 | /usr/lib/python2.7/pickle.pyc in _batch_setitems(self, items)
|
|---|
| 379 | 679 for k, v in tmp:
|
|---|
| 380 | 680 save(k)
|
|---|
| 381 | --> 681 save(v)
|
|---|
| 382 | 682 write(SETITEMS)
|
|---|
| 383 | 683 elif n:
|
|---|
| 384 |
|
|---|
| 385 | /usr/lib/python2.7/pickle.pyc in save(self, obj)
|
|---|
| 386 | 329
|
|---|
| 387 | 330 # Save the reduce() output and finally memoize the object
|
|---|
| 388 | --> 331 self.save_reduce(obj=obj, *rv)
|
|---|
| 389 | 332
|
|---|
| 390 | 333 def persistent_id(self, obj):
|
|---|
| 391 |
|
|---|
| 392 | /usr/lib/python2.7/pickle.pyc in save_reduce(self, func, args, state, listitems, dictitems, obj)
|
|---|
| 393 | 394 "args[0] from __newobj__ args has the wrong class")
|
|---|
| 394 | 395 args = args[1:]
|
|---|
| 395 | --> 396 save(cls)
|
|---|
| 396 | 397 save(args)
|
|---|
| 397 | 398 write(NEWOBJ)
|
|---|
| 398 |
|
|---|
| 399 | /usr/lib/python2.7/pickle.pyc in save(self, obj)
|
|---|
| 400 | 284 f = self.dispatch.get(t)
|
|---|
| 401 | 285 if f:
|
|---|
| 402 | --> 286 f(self, obj) # Call unbound method with explicit self
|
|---|
| 403 | 287 return
|
|---|
| 404 | 288
|
|---|
| 405 |
|
|---|
| 406 | /usr/lib/python2.7/pickle.pyc in save_global(self, obj, name, pack)
|
|---|
| 407 | 746 raise PicklingError(
|
|---|
| 408 | 747 "Can't pickle %r: it's not found as %s.%s" %
|
|---|
| 409 | --> 748 (obj, module, name))
|
|---|
| 410 | 749 else:
|
|---|
| 411 | 750 if klass is not obj:
|
|---|
| 412 |
|
|---|
| 413 | PicklingError: Can't pickle <type 'module'>: it's not found as __builtin__.module
|
|---|
| 414 |
|
|---|