Greta Gerwig's Barbie is finally set to hit the big screen in two weeks, but it has been a long time coming. The Margot Robbie-led film went through production hell to get here, and an Oscar winner who was originally set to scribe the film opened up about the difficulties of getting it off the ground.

Diablo Cody, who won a Best Original Screenplay Oscar for Juno, was originally set to pen the Barbie film. However, that did not happen and Gerwig co-wrote the script with Noah Baumbach. Why was Barbie so hard to nail?

“I think I know why I s**t the bed,” Cody admitted to GQ. “When I was first hired for this, I don't think the culture had not embraced the femme or the bimbo as valid feminist archetypes yet. If you look up Barbie on TikTok you'll find this wonderful subculture that celebrates the feminine, but in 2014, taking this skinny blonde white doll and making her into a heroine was a tall order.”

The initial pairing was Cody writing with Amy Schumer set to star in the film as the doll. “That idea of an anti-Barbie made a lot of sense given the feminist rhetoric of 10 years ago,” she said. “I didn't really have the freedom then to write something that was faithful to the iconography; they wanted a girl-boss feminist twist on Barbie, and I couldn't figure it out because that's not what Barbie is.”

Once Schumer dropped out, Anne Hathaway was slotted as the film's star. But this didn't work either. “I heard endless references to The Lego Movie in development,” Cody revealed.

She continued, “and it created a problem for me because they had done it so well. Any time I came up with something meta, it was too much like what they had done. It was a roadblock for me, but now enough time has passed that they can just cast Will Ferrell as the antagonist in a real-life Barbie movie and nobody cares.”

Nevertheless, Cody is excited about Gerwig's Barbie film, calling it “my Joker.” She still remains cautious about filmmakers when they jump from the independent scene to blockbuster filmmaking as Gerwig is doing and as Barry Jenkins did when he directed the live-action Lion King film. “I understand why those artists have moved into that lane,” she said. “I get it. The most successful movie that I've ever written was Juno, and that wouldn't get a theatrical release today.”

That doesn't mean Diablo Cody hasn't tried. “I wish every day that I could write The Paw Patrol movie because credibility is not going to put my kids through college. I have made several swings at IP with Barbie and Powerpuff Girls, and I take full responsibility for the failures of those attempts because I do have a specific voice and POV and I haven't figured out how to modulate it.”

Barbie will be released on July 21.