Object of class entry could not be converted to string