Barbie writer 's*** the bed' with failed movie

Diablo Cody struggled to even turn in a script.

Margot Robbie as Barbie in the upcoming movie. (Warner Bros. Pictures)
Margot Robbie as Barbie in the upcoming movie. (Warner Bros. Pictures)

Oscar-winning screenwriter Diablo Cody had a nightmare trying to transfer Barbie to the big screen.

Incase you've been living under a rock for the last couple of years, Hollywood heavyweights Margot Robbie and Ryan Gosling are playing the iconic dolls Barbie and Ken for writer-director Greta Gerwig this summer, with a supporting cast that boasts Will Ferrell, Emma Mackey, John Cena and Dua Lipa among others.

But before this project took flight, Cody (who burst onto the scene with the script for Juno) poured her blood, sweat and tears into a failed attempt that was at one stage lead by Amy Schumer.

Read more: Barbie: Teaser trailer for Margot Robbie movie pays tribute to sci-fi classic 2001

"I think I know why I s*** the bed," the scribe told GQ.

"When I was first hired for this, I don't think the culture had 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."

Diablo Cody arrives at the Los Angeles premiere of
Oscar-winning screenwriter Diablo Cody was originally brought in for the big screen Barbie project. (Chris Pizzello/Invision/AP)

Further along, the Tully writer suggested that Schumer's involvement "made a lot of sense" given her counteractive schtick and the "feminist rhetoric" of 2013, yet crafting a legitimate storyline for Mattel's prized possession proved a tough nut to crack.

Read more: Margot Robbie unveiled as Barbie in first look image for Mattel movie

"I didn't really have the freedom then to write something that was faithful to the iconography," reflected Cody, a decade on.

"They wanted a girl-boss feminist twist on Barbie, and I couldn't figure it out because that's not what Barbie is."

Barbie is scheduled for UK release on July 21.

Watch: Billie Eilish to release new song for Barbie soundtrack