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?
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.