The Aug. 5 opening of the 2016 Summer Olympics was still seven days away, but Rio de Janeiro Mayor Eduardo Paes found himself playing catch-up last week. A squad of plumbers, electricians and custodians descended on the Athletes Village for emergency repairs.

It turns out the brand new, $900 million complex of apartment buildings — "the best in the history of the Olympics," Paes had declared — was chockablock with problems, including gas leaks, gushing toilets and electrical shorts. That drove the Australian delegation packing off to local hotels, with the Swedes close behind. The Argentines, Belarusians and Kenyans weighed in with their own gripes, and suddenly the Olympics host city was sprinting to head off a full-blown diplomatic embarrassment.

Mind you, shoddy digs and construction snafus are hardly new in the annals of the Olympics. In 2014, athletes competed to live tweet the most appalling conditions in their living quarters at the winter games in Sochi, Russia. And Olympians still talk of the eleventh-hour paint jobs and the massive blackout that preceded the 2004 games in Athens.