Skip to content Skip to sidebar Skip to footer

How To Solve The Error Which Occurs When Using From Pickle.load() Function?

I would like to load a dataset in IPython Environment and and use it. In the directory containing the dataset, I've got these files: batches.meta data_batch_1 data_batch_2 data_ba

Solution 1:

I found the solution. It's a problem related to python 3.x. when I ran it with python 2.x, I could read all the data from dataset. I also have to say that I've changed a little bit the source code. I mean I used from cPickle library Instead of Pickle and all of the source code except this issue is same as before.


Solution 2:

You need to open your file in binary mode:

with open(filename, 'rb') as f:

Post a Comment for "How To Solve The Error Which Occurs When Using From Pickle.load() Function?"