I’m having trouble with the grader for the Programming Assignment: Social Network Database Fix. My code for one of the exercises is not passing the unit tests. I tested the code on a colleague’s lab, and it worked fine there. It seems like the issue might be specific to my lab environment. I’ve already reset the kernel, rebooted my machine, and restored all the files from the backup folder to be on the safe side. Could someone please help me resolve this issue?
@Rebeca1 ,
Could you share the error output?
Hi @Kic,
Here is the output from the tests. All the test cases are failing; there’s no specific error.
Failed test case: Incorrect friends for person John Rocha.
Expected: ['Andrew Williams', 'Christina Murphy', 'Luis Kim', 'Mark Mcintyre', 'Nicholas Harrington', 'Scott Boyd']
Got: []
Failed test case: Incorrect friends for person William Ruiz.
Expected: ['Brian Mays', 'Mark Allen', 'Michael Powell', 'Nathan Mendez', 'Nicholas Harrington']
Got: []
Failed test case: Incorrect friends for person Jackie Mccullough.
Expected: ['Amanda Norris', 'Mark Allen', 'Nicholas Harrington', 'Scott Boyd']
Got: []
Failed test case: Incorrect friends for person Michael Powell.
Expected: ['Amanda Norris', 'Becky Peterson', 'Jackie Mccullough', 'Luis Kim', 'Michael Clark', 'Omar Mason']
Got: ['William Ruiz']
Failed test case: Incorrect friends for person Scott Boyd.
Expected: ['Andrew Williams', 'Brian Mays', 'John Rocha', 'Michael Clark', 'Nathan Mendez', 'Nicholas Harrington', 'William Ruiz']
Got: ['John Rocha', 'Scott Boyd']
Failed test case: Incorrect friends for person Andrew Williams.
Expected: ['Becky Peterson', 'Jackie Mccullough', 'Julie Hutchinson', 'Michael Clark', 'Michael Powell', 'Scott Boyd', 'William Ruiz']
Got: ['Jackie Mccullough', 'John Rocha', 'Michael Powell', 'William Ruiz']
Failed test case: Incorrect friends for person Amanda Norris.
Expected: ['Elizabeth Hernandez', 'Mark Allen', 'Nicholas Harrington']
Got: []
Failed test case: Incorrect friends for person Becky Peterson.
Expected: ['Amanda Norris', 'Michael Clark', 'William Ruiz']
Got: ['Andrew Williams', 'John Rocha']
Failed test case: Incorrect friends for person Julie Hutchinson.
Expected: ['Andrew Williams', 'Brian Mays', 'Eric Dougherty', 'Jackie Mccullough', 'Omar Mason', 'Scott Boyd']
Got: ['Michael Powell', 'Scott Boyd', 'William Ruiz']
Failed test case: Incorrect friends for person Mark Allen.
Expected: ['Andrew Williams', 'Becky Peterson', 'Christina Murphy', 'Eric Dougherty', 'Jackie Mccullough', 'Michael Clark', 'Nicholas Harrington', 'Scott Boyd']
Got: ['Amanda Norris', 'Mark Allen', 'Michael Powell', 'Scott Boyd', 'William Ruiz']
Failed test case: Incorrect friends for person Nicholas Harrington.
Expected: ['Andrew Williams', 'Brian Mays', 'Elizabeth Hernandez', 'Scott Boyd', 'William Ruiz']
Got: ['John Rocha', 'Michael Powell', 'Scott Boyd']
Failed test case: Incorrect friends for person Michael Clark.
Expected: ['Brian Mays', 'Eric Dougherty', 'Mark Mcintyre', 'Nicholas Harrington', 'Scott Boyd', 'William Ruiz']
Got: ['John Rocha', 'Mark Allen', 'Michael Powell']
Failed test case: Incorrect friends for person Christina Murphy.
Expected: ['Brian Mays', 'Eric Dougherty', 'John Rocha', 'Julie Hutchinson', 'Luis Kim', 'Michael Powell', 'Nathan Mendez', 'Nicholas Harrington', 'Omar Mason']
Got: ['Becky Peterson', 'Christina Murphy', 'Jackie Mccullough', 'Mark Allen']
Failed test case: Incorrect friends for person Omar Mason.
Expected: ['Christina Murphy', 'Jackie Mccullough', 'Luis Kim', 'Mark Allen', 'Mark Mcintyre', 'Nathan Mendez', 'Nicholas Harrington']
Got: ['Julie Hutchinson', 'Mark Allen', 'Michael Clark', 'Omar Mason', 'William Ruiz']
Failed test case: Incorrect friends for person Luis Kim.
Expected: ['Mark Allen', 'Nathan Mendez', 'William Ruiz']
Got: ['John Rocha', 'Julie Hutchinson']
Failed test case: Incorrect friends for person Brian Mays.
Expected: ['Amanda Norris', 'Andrew Williams', 'John Rocha', 'Julie Hutchinson', 'Michael Clark', 'Michael Powell', 'Omar Mason']
Got: ['Andrew Williams', 'Becky Peterson', 'Christina Murphy', 'Jackie Mccullough', 'Nicholas Harrington', 'Scott Boyd']
Failed test case: Incorrect friends for person Eric Dougherty.
Expected: ['Amanda Norris', 'Andrew Williams', 'Julie Hutchinson', 'Scott Boyd']
Got: ['Andrew Williams', 'Becky Peterson', 'Michael Powell', 'Scott Boyd']
Failed test case: Incorrect friends for person Nathan Mendez.
Expected: ['Andrew Williams', 'Elizabeth Hernandez', 'John Rocha', 'Luis Kim', 'Scott Boyd', 'William Ruiz']
Got: ['John Rocha', 'Michael Powell', 'Nathan Mendez', 'Omar Mason', 'Scott Boyd']
Failed test case: Incorrect friends for person Elizabeth Hernandez.
Expected: ['Becky Peterson', 'Brian Mays', 'Christina Murphy', 'Eric Dougherty', 'Jackie Mccullough', 'Luis Kim', 'Michael Powell']
Got: ['Amanda Norris', 'Brian Mays', 'Jackie Mccullough', 'Luis Kim', 'Michael Clark', 'Omar Mason', 'William Ruiz']
Failed test case: Incorrect friends for person Mark Mcintyre.
Expected: ['Andrew Williams', 'Elizabeth Hernandez', 'Mark Allen', 'Nicholas Harrington', 'Omar Mason', 'William Ruiz']
Got: ['Christina Murphy', 'John Rocha', 'Julie Hutchinson', 'Mark Allen', 'Nathan Mendez', 'Scott Boyd']
Issue resolved: Although the first exercise were passing all test cases, the data was being loaded incorrectly into the database.
Hi @Rebeca1 ,
It looks like there is a problem either with the database/relationships, all the outputs are different from the expected outputs. The grader tests are more extensive than unit test.
You can try refresh your workspace and rewrite the code, here is a link to the instruction for refreshing the workspace.