Hello,
I am trying to load python pickle object. I keep getting the below error message and I am unable to resolve the issue. The data which i am trying to load is CIFAR10 Dataset. Below is my code with which i am trying to load datasets.
using PyCall
@pyimport pickle
function load_pickle_data(ROOT)
datadict = Dict()
for b=1:5
f=joinpath(ROOT, "data_batch_$b")
fo=open(f,"r")
datadict=pickle.load(fo)
end
datadict
end
ERROR
PyError (ccall(@pysym(:PyObject_Call), PyPtr, (PyPtr, PyPtr, PyPtr), o, arg, C_NULL)) <type 'exceptions.TypeError'>
TypeError("unhashable type: 'bytearray'",)
File "/Users/Saran/.julia/v0.6/Conda/deps/usr/lib/python2.7/pickle.py", line 1384, in load
return Unpickler(file).load()
File "/Users/Saran/.julia/v0.6/Conda/deps/usr/lib/python2.7/pickle.py", line 864, in load
dispatch[key](self)
cifar-10-batches-py
Directory has the following files in it
batches.meta
data_batch_1
data_batch_2
data_batch_3
data_batch_4
data_batch_5
readme.html
test_batch
cifar-10-batches-py directory and the Julia file which i am running are in the same folder. Kindly help me out in fixing this issue.
Thank You