Strange keyerror (KeyError: 'g')

see conversation at Java errors in notebook