Madlibs Error


When I try and run the code, this is what I get:

Traceback (most recent call last):
File “”, line 26, in
print STORY % (adjective_a, name, verb_a, adjective_b, noun
_a, noun_b, animal, food, verb_b, noun_c, fruit, adjective_c, n
ame, verb_c, number, name, superhero_name, superhero_name, name
, country, name, dessert, name, year, noun_d)
ValueError: unsupported format character ‘,’ (0x2c) at index 45

I don’t know what’s wrong with the code. Can anyone help?



Hi @methodblaster80570,

My copy of your program, copied and pasted directly from GitHub, executed without any problem on Codecademy’s Python Mad Libs page. When you ran the program, did you enter any unusual characters when prompted for input?

EDITED October 2, 2017 to add the following

I have been unable to reproduce the problem on Codecademy’s MadLibs page. Even inputting unusual characters produced a result without raising an error. Were you running the program in an environment outside Codecademy’s site when the problem occurred?


No, I was using the codeacademy console and was typing exactly what it said too. Maybe it was a glitch or something.

After trying it again, it was a glitch in the system. Without changing anything in the code I was able to successfully complete it.