<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: LayerToKML script execution error ERROR 000210 in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/layertokml-script-execution-error-error-000210/m-p/501045#M39353</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the same problem, so the solution is PRO 2.4?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 Oct 2020 00:07:16 GMT</pubDate>
    <dc:creator>redacel_uniredacel_uni</dc:creator>
    <dc:date>2020-10-01T00:07:16Z</dc:date>
    <item>
      <title>LayerToKML script execution error ERROR 000210</title>
      <link>https://community.esri.com/t5/python-questions/layertokml-script-execution-error-error-000210/m-p/501039#M39347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to write a very simple script that exports a layer to KMZ file using&amp;nbsp;LayerToKML GP tool.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy

out&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;r&lt;SPAN class="string token"&gt;"C:\AhmadData\di\pro\test.kmz"&lt;/SPAN&gt;
pLocation&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;r&lt;SPAN class="string token"&gt;"C:\AhmadData\di\pro\data5\Data5.aprx"&lt;/SPAN&gt;

p &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mp&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ArcGISProject&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;pLocation&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
mp &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; p&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;listMaps&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;


&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; lyr &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; mp&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;listLayers&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
                &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;lyr&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;name&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;


                arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;conversion&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;LayerToKML&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;lyr&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;out&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"NO_COMPOSITE"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"DEFAULT"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1024&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;96&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"CLAMPED_TO_GROUND"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the Data source is file FGDB and Pro map has only one layer with 10 lines features ( the data is very simple)&amp;nbsp;&lt;/P&gt;&lt;P&gt;the script executed locally on my C drive, but I keep getting this error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;arcgisscripting.ExecuteError: ERROR 000210: Cannot create output C:\Users\&lt;SPAN style="color: #ff0000;"&gt;&amp;lt;USER&amp;gt;&lt;/SPAN&gt;\AppData\Local\Temp\{74AB2B10-C6A1-4D89-AB64-FE6CE55D17FE}.lyrx&lt;BR /&gt;Failed to execute (LayerToKML).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I checked my local temp folder and I have full&amp;nbsp;Read and Write permissions. my question is why&amp;nbsp;I am getting this error, and why the tool is trying to export the lyrx to the temp folder?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tired to set arcpy.env.workspace to point to the project location but it didnt&amp;nbsp;nothing.&lt;/P&gt;&lt;P&gt;I am using ArcGIS Pro 2.5&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:59:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/layertokml-script-execution-error-error-000210/m-p/501039#M39347</guid>
      <dc:creator>AhmadSALEH1</dc:creator>
      <dc:date>2021-12-11T21:59:53Z</dc:date>
    </item>
    <item>
      <title>Re: LayerToKML script execution error ERROR 000210</title>
      <link>https://community.esri.com/t5/python-questions/layertokml-script-execution-error-error-000210/m-p/501040#M39348</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The { and } characters in the filename are not valid.&amp;nbsp; You need to remove them or provide a different file name.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2020 17:25:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/layertokml-script-execution-error-error-000210/m-p/501040#M39348</guid>
      <dc:creator>RandyBurton</dc:creator>
      <dc:date>2020-09-10T17:25:20Z</dc:date>
    </item>
    <item>
      <title>Re: LayerToKML script execution error ERROR 000210</title>
      <link>https://community.esri.com/t5/python-questions/layertokml-script-execution-error-error-000210/m-p/501041#M39349</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Randy, I dont have any control on the lyrx file name or location, I think its apart of the&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;LayerToKML Geo-processing tool.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;I tired to run the script from Pro Python window and it worked and I can see the file generated in the Temp folder even with {} in the name.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2020 17:30:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/layertokml-script-execution-error-error-000210/m-p/501041#M39349</guid>
      <dc:creator>AhmadSALEH1</dc:creator>
      <dc:date>2020-09-10T17:30:39Z</dc:date>
    </item>
    <item>
      <title>Re: LayerToKML script execution error ERROR 000210</title>
      <link>https://community.esri.com/t5/python-questions/layertokml-script-execution-error-error-000210/m-p/501042#M39350</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Shouldn't line 5 come before line 2 where pLocation is referenced?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2020 18:24:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/layertokml-script-execution-error-error-000210/m-p/501042#M39350</guid>
      <dc:creator>RandyBurton</dc:creator>
      <dc:date>2020-09-10T18:24:55Z</dc:date>
    </item>
    <item>
      <title>Re: LayerToKML script execution error ERROR 000210</title>
      <link>https://community.esri.com/t5/python-questions/layertokml-script-execution-error-error-000210/m-p/501043#M39351</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes It should, it might be switched while I am copying and pasting from my script to Geonet &lt;BR /&gt;( I updated the code snippet) , thank you for catching it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems to be a bug in Pro 2.5!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/thread/250466"&gt;Layer to KML works in Python window but not in Script tool [Update: Bug]&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The script works in&amp;nbsp; Pro 2.4 , I am going to test on&amp;nbsp;&amp;nbsp;Pro 2.6 and confirm if it works or not.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2020 18:30:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/layertokml-script-execution-error-error-000210/m-p/501043#M39351</guid>
      <dc:creator>AhmadSALEH1</dc:creator>
      <dc:date>2020-09-10T18:30:35Z</dc:date>
    </item>
    <item>
      <title>Re: LayerToKML script execution error ERROR 000210</title>
      <link>https://community.esri.com/t5/python-questions/layertokml-script-execution-error-error-000210/m-p/501044#M39352</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="link-titled" href="https://support.esri.com/en/bugs/nimbus/QlVHLTAwMDEyOTgwNQ==" title="https://support.esri.com/en/bugs/nimbus/QlVHLTAwMDEyOTgwNQ=="&gt;BUG-000129805: Running the Layer to KML geoprocessing tool works in..&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;not addressed yet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2020 19:48:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/layertokml-script-execution-error-error-000210/m-p/501044#M39352</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2020-09-10T19:48:29Z</dc:date>
    </item>
    <item>
      <title>Re: LayerToKML script execution error ERROR 000210</title>
      <link>https://community.esri.com/t5/python-questions/layertokml-script-execution-error-error-000210/m-p/501045#M39353</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the same problem, so the solution is PRO 2.4?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Oct 2020 00:07:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/layertokml-script-execution-error-error-000210/m-p/501045#M39353</guid>
      <dc:creator>redacel_uniredacel_uni</dc:creator>
      <dc:date>2020-10-01T00:07:16Z</dc:date>
    </item>
    <item>
      <title>Re: LayerToKML script execution error ERROR 000210</title>
      <link>https://community.esri.com/t5/python-questions/layertokml-script-execution-error-error-000210/m-p/501046#M39354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;On the link I posted....&amp;nbsp;&lt;A class="link-titled" href="https://support.esri.com/en/bugs/nimbus/QlVHLTAwMDEyOTgwNQ==" title="https://support.esri.com/en/bugs/nimbus/QlVHLTAwMDEyOTgwNQ=="&gt;BUG-000129805: Running the Layer to KML geoprocessing tool works in..&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;hit the &lt;STRONG&gt;Subscribe&lt;/STRONG&gt; link to get updates&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Oct 2020 01:28:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/layertokml-script-execution-error-error-000210/m-p/501046#M39354</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2020-10-01T01:28:55Z</dc:date>
    </item>
  </channel>
</rss>

