updated error codes in python scripts