The following python code is giving an error:
data = pickle.load('testData.pkl')
TypeError: file must have 'read' and 'readline' attributes.
The load() function of pickle module takes the file object as an argument. Here you are passing the file name as an argument and hence it's is giving the error. Use the following code to fix the error:
with open('testData.pkl','rb') as f: data = pickle.load(f)