However, it was beloved by critics and fans alike, and in 1972, Wilder was nominated for a Golden Globe for his role.
In the years since, the movie, which currently has an 89 percent approval rating on Rotten Tomatoes, has developed a bit of a cult following, in part because of its regular TV showings.
But here are a few stories about the film that even the most die-hard fans might not know.
1. Roald Dahl hated the movie: According to a 2005 BBC story, Dahl wanted comedian Spike Milligan to play Willy Wonka, and when Wilder was cast instead, he soured on the project. But it was when he discovered that the plot of the film would deviate from that of the book that he became infuriated. "He thought it placed too much emphasis on Willy Wonka and not enough on Charlie," Liz Attenborough, trustee of the Roald Dahl Museum and Story Centre, told the BBC. "For him, the book was about Charlie."
3. Wilder had influence on Wonka's actions: According to the BBC, Wilder wanted Wonka's first appearance in the film to confuse the viewer. In the scene in which he walks out of the chocolate factory, he pretends to be a frail, elderly man before tumbling to meet his guests. "I knew that from then on the audience wouldn't know if I was lying or telling the truth," Wilder later explained. Stuart also said that Wilder improvised bits of the eerie song that Wonka sang on the psychadelic boat ride and brought new life to the explosive scene toward the end of the film in which Wonka yells at Charlie.
4. Shoots weren't always easy: Peter Ostrum, who played Charlie, and Julie Dawn Cole, who portrayed Veruca Salt, said in a 2011 interview that some of the scenes in the movie were difficult to film. The black and white room was "particularly uncomfortable," Cole said, and Ostrum added that it was difficult to film the scene involving the fizzy lifting drink because of the harnesses and wires involved. But even some of the more low-tech scenes had their challenges. Cole said that the scene in which she sang "I Want It Now" required 36 takes.
5. The actors didn't see the chocolate room until filming began: Rusty Goffe, who played an Oompa Loompa in the film, said in 2011 that Stuart didn't allow the child actors in the film to see Wonka's famous chocolate room until he had cameras rolling. Their reactions, he explained, were captured on film, and used in the movie.
6. Some of the candy on set was actually real: Paris Themmen, who played Mike Teavee, wrote in Reddit Ask Me Anything chat that Violet Beauregarde's "three-course gum" was actually a toffee-based candy and that marzipan was also ubiquitous on set. However, the giant gummy bears, sadly, were plastic, and the wallpaper tasted ... like wallpaper. "In general, if we ate it on film it was real, and if not, it was fake," Themmen wrote. "Visually, the room was unbelievable."
7. The Oompa Loompas actors played pranks: Themmen also revealed in his AMA chat that the actors who played the Oompa Loompas were "notoriously mischievous." "We all stayed in a hotel together. In those days, when you wanted to have your shoes shined, you'd leave them outside of your hotel room door. One night the Oompa Loompas grabbed all the shoes, tied the laces together, and left them in a pile to be found in the morning," he wrote.
8. Willy Wonka's office was originally meant to be as beautiful as the factory: Stuart described the original set of Wonka's office as "the most gorgeous office you've ever seen," but he realized quickly that it just didn't fit the character. To rectify the situation, "I had the crew come in and cut the desk in half, the chairs in half, the safe in half, everything except the lightbulbs had to be in half," he said in a 2011 interview, "because it had to reflect Willy Wonka's fake madness."