<?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: Arcpy error.  in Python Snippets Questions</title>
    <link>https://community.esri.com/t5/python-snippets-questions/arcpy-error/m-p/857277#M591</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my python path.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sent from Mail&amp;lt;https://go.microsoft.com/fwlink/?LinkId=550986&amp;gt; for Windows 10&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Apr 2020 16:41:15 GMT</pubDate>
    <dc:creator>EmmaAppel</dc:creator>
    <dc:date>2020-04-23T16:41:15Z</dc:date>
    <item>
      <title>Arcpy error.</title>
      <link>https://community.esri.com/t5/python-snippets-questions/arcpy-error/m-p/857269#M583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am currently trying to write a script that iterates through files in a folder to do geoprocessing. However, I am getting held up at the very start of my code with an error I cannot explain or find an answer to. I am basically a novice at Python scripting, however, I have used arcpy and pyscripter successfully throughout my schooling to run moderately complex scripts and have never seen this error before.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the error I am getting:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;EM&gt;ERROR: File "c:\program files (x86)\arcgis\desktop10.7\ArcToolbox\Toolboxes\kml_to_shp.py", line 20, in &amp;lt;module&amp;gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; kmlFile = sys.argv[1] # kml file&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;lt;type 'exceptions.IndexError'&amp;gt;: list index out of range&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;E:\ScalesCNPP\START\GPS TRACKS\BALA\MK\KML&lt;/EM&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is my script:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/489400_pastedImage_13.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I should also mention that when I try to set arcpy.env.workspace it seems to be failing after I type in the "arcpy.env." "workspace" does not show up in the autocomplete list so I truly have no idea whats going on.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Apr 2020 15:07:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-snippets-questions/arcpy-error/m-p/857269#M583</guid>
      <dc:creator>EmmaAppel</dc:creator>
      <dc:date>2020-04-21T15:07:18Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy error.</title>
      <link>https://community.esri.com/t5/python-snippets-questions/arcpy-error/m-p/857270#M584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Emma,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm curious if you try another directory for arcpy.env.workspace will you receive the same error?&amp;nbsp; For example, try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;arcpy.env.workspace=r"E:\ScalesCNPP"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Apr 2020 16:03:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-snippets-questions/arcpy-error/m-p/857270#M584</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2020-04-21T16:03:34Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy error.</title>
      <link>https://community.esri.com/t5/python-snippets-questions/arcpy-error/m-p/857271#M585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jake,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get the exact same error no matter what I set the workspace as. It appears that setting the workspace environment isn’t working at all. It might be a problem with the version of python / pyscripter, howevere it has been working fine until today and I haven’t changed anything so I don’t know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sent from Mail&amp;lt;https://go.microsoft.com/fwlink/?LinkId=550986&amp;gt; for Windows 10&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Apr 2020 16:09:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-snippets-questions/arcpy-error/m-p/857271#M585</guid>
      <dc:creator>EmmaAppel</dc:creator>
      <dc:date>2020-04-21T16:09:18Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy error.</title>
      <link>https://community.esri.com/t5/python-snippets-questions/arcpy-error/m-p/857272#M586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you run the code in ArcMap/ArcGIS Pro, do you receive the same error?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Apr 2020 18:21:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-snippets-questions/arcpy-error/m-p/857272#M586</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2020-04-21T18:21:47Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy error.</title>
      <link>https://community.esri.com/t5/python-snippets-questions/arcpy-error/m-p/857273#M587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can run the code fine in ArcMap python window, its just when i’m using pyscripter.  Im not great at running command line code, and its something I want to replicate over at least 10 folders so would like to be able to just write and edit in pyscripter where its easier to edit. I have even tried unistalling pyscripter, and reinstalling it. Honestly have no idea why its happening. It gives me the same error even when I just have “ import arcpy”&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sent from Mail&amp;lt;https://go.microsoft.com/fwlink/?LinkId=550986&amp;gt; for Windows 10&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Apr 2020 16:20:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-snippets-questions/arcpy-error/m-p/857273#M587</guid>
      <dc:creator>EmmaAppel</dc:creator>
      <dc:date>2020-04-23T16:20:51Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy error.</title>
      <link>https://community.esri.com/t5/python-snippets-questions/arcpy-error/m-p/857274#M588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check what version of Python PyScripter is running.&amp;nbsp; You can do this by clicking on the Python Versions tool in PyScripter:&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/489715_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;Choose &lt;STRONG&gt;Setup Python Versions&lt;/STRONG&gt;.&amp;nbsp; What is listed under your &lt;STRONG&gt;Registered Versions&lt;/STRONG&gt;?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/489734_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Apr 2020 16:25:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-snippets-questions/arcpy-error/m-p/857274#M588</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2020-04-23T16:25:48Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy error.</title>
      <link>https://community.esri.com/t5/python-snippets-questions/arcpy-error/m-p/857275#M589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Currently Running Python 2.7(32bit). Which by my understanding is the correct one to be using with arcmap because it doesn’t work with the newer ones?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sent from Mail&amp;lt;https://go.microsoft.com/fwlink/?LinkId=550986&amp;gt; for Windows 10&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Apr 2020 16:31:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-snippets-questions/arcpy-error/m-p/857275#M589</guid>
      <dc:creator>EmmaAppel</dc:creator>
      <dc:date>2020-04-23T16:31:03Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy error.</title>
      <link>https://community.esri.com/t5/python-snippets-questions/arcpy-error/m-p/857276#M590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the path to your python 2.7 version?&amp;nbsp; See my screen shot above.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Apr 2020 16:34:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-snippets-questions/arcpy-error/m-p/857276#M590</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2020-04-23T16:34:23Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy error.</title>
      <link>https://community.esri.com/t5/python-snippets-questions/arcpy-error/m-p/857277#M591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my python path.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sent from Mail&amp;lt;https://go.microsoft.com/fwlink/?LinkId=550986&amp;gt; for Windows 10&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Apr 2020 16:41:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-snippets-questions/arcpy-error/m-p/857277#M591</guid>
      <dc:creator>EmmaAppel</dc:creator>
      <dc:date>2020-04-23T16:41:15Z</dc:date>
    </item>
  </channel>
</rss>

