Thirty-eight persons were stranded 30-to-40 feet off the ground last night for almost two hours after a mechanical failure in a carnival ride in the parking lot of the Capital Centre, authorities reported.

No injuries were reported in the incident, and the 38 persons on the ski lift ride were brought down safely by 11:06 p.m., Prince George's County fire and rescue officials said.

The electrically powered ride was shut off at 9 p.m. after a cable slipped from its track in the wheel of a pulley, said Barry Silberman, special events director at the center. The ride uses an arrangment of cables and pulleys to move seats through the air.

"There wasn't much danger" when the cable slipped, ". . . because the ride is held up by dozens of cables and wheels," Silberman said.

The Summerfun Carnival, operated by the James E. Strates Co., of Orlando, Fla., opened Friday down about 15 of the stranded passengers. The others, whose seats were beyond reach of the forklift, were brought down by a fire department hook and ladder truck.

Silberman said the 38 persons will be given tickets admitting them to another night at the cardival.