I get the above mentioned error from running an existing code that I want to use for my recommender system.
Here is the code:
def GetTopN(predictions,