UnboundLocalError in who_is_it block in week 4

Not in the database.

UnboundLocalError Traceback (most recent call last)
in
1 # BEGIN UNIT TEST
2 # Test 1 with Younes pictures
----> 3 who_is_it(“images/camera_0.jpg”, database, FRmodel)
4
5 # Test 2 with Younes pictures

in who_is_it(image_path, database, model)
43 print ("it’s " + str(identity) + ", the distance is " + str(min_dist))
44
—> 45 return min_dist, identity

UnboundLocalError: local variable ‘identity’ referenced before assignment

I tried restarting the kernel it isn’t working can someone clarify why am I getting this error

Check that you assign identity to the right person in the function before you run tests. From the instructions:

  • Compute the L2 distance between the target “encoding” and the current “encoding” from the database. If this distance is less than the min_dist, then set min_dist to dist, and identity to name.