I'm trying to make figlet text in my terminal in python, as per one of the practice problems in week 6 of CS50. I'm trying to have a font picked randomly from pyfiglet's list of fonts, and I'm trying to implement this as follows:
import random
from pyfiglet import Figlet
figlet = Figlet()
figfonts = figlet.getFonts()
# ...
random.seed()
figlet.setFont(random.choice(figfonts)) # error here
However, when I run this in my terminal, I get the following error:
TypeError: Figlet.setFont() takes 1 positional argument but 2 were given
I'm confused. I'm only providing figlet.setFont()
1 argument, why is it saying that there are two? I just can't piece together what the error message is trying to tell me is wrong.