The error seems to be raised by pickle so you might need to change the encoding via:
import pickle
pickle.load = partial(pickle.load, encoding="latin1")
pickle.Unpickler = partial(pickle.Unpickler, encoding="latin1")
model = torch.load(model_file, map_location=lambda storage, loc: storage, pickle_module=pickle)

This would be necessary, if you’ve stored e.g. numpy arrays in Python2 and try to load it in Python3.
However, PyTorch 1.5.1 didn’t support Python2.7 anymore, so I’m not sure if that’s the root cause of this issue.