Pickling Error on Bear Classifier

I am trying to pickle my model while following the second chapter. Though I’ve ran into this particular issue:

Error! /notebooks/export.pkl is not UTF-8 encoded
Saving disabled.
See Console for more details.

I’ve done everything I could by myself on this issue, please help.

Probably need to see all the relevant code that is generating this error to help.

I’m able to export using

I appreciate you helping me on this. I’ve tried the below two variations and just tried your variation above. I get the same error message on all three methods.

The book’s method.

path = Path()

Method I’ve used that has worked on other projects.

import pickle
with open(‘Bear_Pickle’, ‘wb’) as f:
pickle.dump(learn, f)

Your method.