handling python errors;  translating literals