Louis C.K. is thriving — his standup gigs are packed, his hit FX show "Louie" is a critical darling, and his self-produced standup special, "Live at the Beacon Theater," turned a very fast profit.

But he took a few minutes Sunday to look back on what he considers one of his greatest failures: "Pootie Tang."

Also read: How Louis C.K. Cut Out Networks, Used Them to Make $1M, and Gave Half of It Away

During a panel at the Television Critics Association winter press tour, C.K. was informed that John Waters longed for a novelization of the 2001 film, which C.K. was fired from directing.

"That’s really nice. I love John Waters. He’s a great filmmaker," C.K. said, before adding, "I wish he praised me for something else."

Also read: Louis C.K. Wonders Why There Aren't More Murders

He went on to call "Pootie Tang" — a comedy about a belt-wielding ghetto folk hero — "a tragedy to me," and "a very huge mistake" that "never should have been made."

C.K. said he was credited with directing the film even after his firing.

"I would feel really good if I had been making a great movie and then they kicked me off. But I was sucking at making the movie, and they rightfully fired me. And then it came out with my name on it, so," he said.

He also described producer John Goldwyn screaming at him in his office at Paramount: "His face was really red, and I was sitting there going, wow, I’m really a movie guy now."

Everything worked out: C.K. said he learned from "Pootie Tang" what mistakes not to make, and that the experience helped prepare him for write, produce, direct, edit and star in "Louie."

"I think that a failing at 'Pootie Tang' is why this show is good," he said. "It’s one of the reasons. It’s that and a huge — just an army of failures that have wrecked my life, made me good at this.

He added: "I got to make a movie finally, which was my dream, and it was terrible, and then it got made even more terrible, and then it came out, and I was just hated. I mean, the first time I was known by a lot of people was because I made a bad movie.

"And I remember watching Roger Ebert say — I grew up watching Roger Ebert doing movie criticism, and he said, 'I can’t even say this is a bad movie, because it’s not even complete. It’s incomplete. It’s not even a movie.' It was the worst. I think it’s probably the worst review he ever gave to a movie. … But the great thing is that after maybe a week, it just goes away, and all you’re left with is the forensic evidence of all the mistakes you made and all of the rocks that you’ve kind of crashed into, and you’re left with this beautiful map of where all the dangers are, and you repair all the holes, and then you’re so much better."

Enjoy the trailer for "Pootie Tang":