In an April 30, 2011 file photo, visitors at the Kennedy Space Center take photos and get a close view of space shuttle Endeavour on Pad 39A in Cape Canaveral, Fla. NASA said Sunday, May 1, 2011 that space shuttle Endeavour's final launch is off until at least the end of the week because technicians need to replace a switch box in the engine compartment. (AP Photo/John Raoux)

Space shuttle Endeavour's final launch is off until at least the end of the week because technicians need to replace a switch box in the engine compartment, NASA said Sunday.

The six astronauts - led by commander Mark Kelly - wasted no time heading back to Houston.

Kelly's wife, Rep. , did not join the astronauts in flying back. The timing of her return to Houston, to resume rehab after being wounded in a shooting rampage four months ago, was uncertain.

As late as Saturday, the astronauts and their families were still hoping for a possible launch attempt on Monday. But NASA gave up on that once it became clear extensive repair work would be needed to fix a faulty heater system aboard Endeavour. The trouble prevented the shuttle from blasting off Friday; President and his family were among those missing out.

"We all had our fingers crossed looking forward to a quick rescheduling of the launch," said C.J. Karamargin, a Giffords spokesman.

Said Endeavour's pilot, Gregory Johnson, in a Sunday morning tweet: "Things happen fast. We are now all aboard (a plane) for return to Houston. Be back in a few days. More to follow."

The flight - the second-to-last in NASA's 30-year - has attracted intense interest because of Giffords, who was shot through the head nearly four months ago.

Giffords arrived in Cape Canaveral last Wednesday to be with her husband and the five other astronauts and their families, and to see him rocket into orbit. It was not immediately known if she would return for the second try.

NASA spokesman Allard Beutel said technicians and engineers will replace a suspect switch box in Endeavour's . Two days of testing are required, once the new box goes in.

A new launch date was not set, Beutel said, but given all the repair work, the next opportunity appeared to be no earlier than the end of the week. Complicating matters is Friday's planned launch of a military satellite; NASA will have to give the unmanned rocket a chance to soar before Endeavour can make a second stab at blasting off to the International Space Station.

Endeavour holds a $2 billion particle physics experiment and spare space station parts.

had fueled Endeavour and Kelly and his crew were en route to the launch pad on Friday when the countdown was halted. A heater for the fuel line leading to one of the shuttle's auxiliary power unit had failed. Engineers hoped it would be an easy fix, but weekend testing showed that the most likely culprit was the switch box.

While disappointed not to see a liftoff, Obama, his wife and two daughters visited Kennedy Space Center anyway and got to see shuttle Atlantis in the hangar, and meet with Giffords and the entire Endeavour crew.

Hundreds of thousands had begun to descend on and, like the , did a U-turn once Friday's was called off.

Only one other shuttle mission remains, by Atlantis this summer.