read pickle file
with open('filename', 'rb') as f:
x = pickle.load(f)
read pickle file
with open('filename', 'rb') as f:
x = pickle.load(f)
TypeError: cannot pickle 'module' object
You can't pickle an entire module, you'll have to break the module up
into the attributes you need, for example this problem occured to me when
I was trying to multiprocess opencv2, instead of sending in the whole
module I just sent in the attributes: waitKey, imshow, imread and
destroyAllWindows, so the system only has to pickle those functions
rather than the whole module which worked out.
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us