I\'m using Python 3.6 and Spyder (Anaconda). I have tried many things but nothing worked out. I don\'t know why this error is coming always to me while loading with pickle.
You need to open your file as a binary file:
pickle.loads(open("accounts.txt", 'rb').read())
Otherwise, it's using an str to read the data.
str