The problem is that RaceGen has two arguments, 'self' because it is inside of a class, and 'event' to pass the clicked event details.
def RaceGen(self, event): CR = ("Dwarf", "Dragonborn", "Elf", "Gnome", "Half-Elf", "Half-Orc", "Halfing", "Human", "Tiefling") print(f"{random.choice(CR)}")