| 36 | == Session._try_store_on_disk == |
| 37 | |
| 38 | if you get an error in Session._try_store_on_disk() that there is an object in dict(self) that cannot be pickled, then print out the dict(self) immediately before the exception gets raised, and look for any unusual objects (all callables, an instances of most classes are wrong - whereas atomic values and Storages/dicts/lists are fine). In doubt try to (c)pickle.dump each and every type at the CLI. |
| 39 | |
| 40 | Then look where this object gets stored in the session (that can take a lot of time because it could be hundreds of occurences and thus be difficult to identify the wrong case). If you can find it - either try to replace the object instance by something that can be pickled, or move the instance into response.s3 or into current. |
| 41 | |