python completion error fixing