Debate was still going on when midnight rolled around.

The California Legislature last night failed to pass SB 722, a bill that would have required California public utilities to obtain 33 percent of their power from "new renewables," i.e., solar, wind, geothermal, and biomass, but not large-scale hydroelectric dams. Debate was proceeding on a companion bill when August 31 turned into September 1 and the session ended.

The failure is a blow to environmentalists, but also to outgoing Republican Governor Arnold Schwarzenegger, who has made growing California's green economy one of the major pillars of his administration. A.B. 32, the carbon regulation passed by the state years earlier, has created 500,000 jobs, according to Bill Weihl, Google's green energy czar.

But that's the good news: Arnold still has time before the election to call a special session of the legislature to get it passed. He's done it before. Think of the movie tie-ins. "What is good? To see the state senators driven before you and hear the lamentations of the women."

The bill has widespread support among Silicon Valley executives. There are exceptions. Two semi-retired Valley executives -- former eBay CEO Meg Whitman and fired Hewlett Packard CEO Carly Fiorina -- are against it and are, respectively, running for Governor and the U.S. Senate. Whitman has also vowed to suspend A.B. 32, which former eBay exec turned VC Steve Westly calls a "colossal mistake."

California currently requires that the public utilities get 20 percent of their power from new renewables by 2010. The three big utilities -- PG&E, SDG&E, SCE -- will not make it. However, the law has a built-in extension and most will likely comfortably meet the expanded requirement. All three utilities have been aggressively signing contracts to get energy from solar thermal power plants and other renewable power providers. Independent power providers, though, have been having difficulties getting permits and funding for the projects.

Despite bills like A.B. 32 and a thriving startup culture, the bureaucratic tangles have hurt California's efforts to build a green industry. In this year alone, Mississippi and its Republican Governor Haley Barbour have wooed three green companies -- Soladigm, Twin Creeks Technologies and Kior -- with loans from the state and other ARRA-like stimulus packages to build factories in that state. (The bipartisanship on the state level in many areas is actually quite heartening.) The costs are lower and the permits are easier to obtain. Michigan, some VCs have told me, has become attractive for similar reasons, along with the added bonus of a large population of process and mechanical engineers.

"We are extremely disappointed and bewildered that the Legislature could not pass a 33-percent-renewable energy bill this session, despite the unquestionable need to finish the job on the Renewable Portfolio Standard this year," said Laura Wisland, energy analyst at the Union of Concerned Scientists, in a prepared statement.