def convertPairList(userList,csvFile):

    pairList = []
    userLookupDict = makeUserLookupDictByGithubId(userList)
    for line in csvFile:
        line['Partner1_GithubID']=line['Partner1_GithubID'].lower().strip()
        line['Partner2_GithubID']=line['Partner2_GithubID'].lower().strip()
        if not (line['Partner1_GithubID'] in userLookupDict):
            raise Exception("Partner1_GithubID from pair file not found in user list: {0}".format(line['Partner1_GithubID']))
        
        if not (line['Partner2_GithubID'] in userLookupDict):
            raise Exception("Partner2_GithubID from pair file not found in user list: {0}".format(line['Partner2_GithubID']))
        
        team = {}
        user1 = userLookupDict[line['Partner1_GithubID']]
        user2 = userLookupDict[line['Partner2_GithubID']]
        if (user1["github"] > user2["github"]): 
            # Swap if out of order
            temp = user1
            user1 = user2
            user2 = temp
        team["user1"] = user1
        team["user2"] = user2
        team["teamName"]="Pair_" + user1['github'] + "_" + user2['github']
        
        pairList.append(team)
        
    return pairList
userList is a list of dictionaries with keys first,last,github,email,csil
dataset/ETHPy150Open UCSB-CS-Using-GitHub-In-Courses/github-acad-scripts/github_acadwf.py/convertPairList