The code is good. From the console it appears that the first run was ok, and then you ran again the script and the face cannot be created. The problem is that you are trying to create a face object in the same place occupied by the face created before. Clean all your objects first (select all> delete), and try again.