Changed error code in py file