In my limited experience 'failed to execute' was caused by errors in parameters. Does the country has something special like a name with a space? "new zealand" for example?
Can you test you script with only this country and troubleshoot from there?
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.