Please give me ideas why would I get following errors:

Traceback (most recent call last):
  File "C:\temp_Jag\", line 3, in <module>
    unpickledlist = pickle.load(unpicklefile)
  File "C:\Python26\lib\", line 1370, in load
    return Unpickler(file).load()
  File "C:\Python26\lib\", line 858, in load
  File "C:\Python26\lib\", line 1142, in load_pop_mark
    k = self.marker()
  File "C:\Python26\lib\", line 874, in marker
    while stack[k] is not mark: k = k-1
IndexError: list index out of range

..for the following code:

import pickle
unpicklefile = open('Ex.txt', 'rb')
unpickledlist = pickle.load(unpicklefile)

Thank you!

You cannot just open an ordinary txt file with pickle.
You have to dump something to it first.

# Save a dictionary into a pickle file.
import pickle

favorite_color = {"lion": "yellow", "kitty": "red"}
pickle.dump(favorite_color, open("Ex.txt", "wb"))

favorite_color = pickle.load(open("Ex.txt", "rb" ))
print(favorite_color) #{'lion': 'yellow', 'kitty': 'red'}