ordereddict try except import clause