import pickle
st=" "
with open("","rb") as fh:
Please tell what's wrong in this program. It is returning error line-->

_pickle.UnpicklingError: invalid load key, '\xef'.

I have stored a pickled file named containing a string. I want to get the string till 'o' and ignore the left behind string.
The string is --->

"This is my first line. This is my second line".