python: handle failure to create client.