Skip to content

Instantly share code, notes, and snippets.

@Mlawrence95
Created December 5, 2019 23:51
Show Gist options
  • Save Mlawrence95/fb81573a98f4d60383d0e419bcfd1a71 to your computer and use it in GitHub Desktop.
Save Mlawrence95/fb81573a98f4d60383d0e419bcfd1a71 to your computer and use it in GitHub Desktop.
Old pickle files can be a pain to work with. This can make SliceTypes and ObjectType exceptions go away in certain circumstances.
import pickle
import dill
dill._dill._reverse_typemap['SliceType'] = slice
dill._dill._reverse_typemap['ObjectType'] = object
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment