<?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: Python Crashes on Call to ListLayers in Data-Driven Pages in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/python-crashes-on-call-to-listlayers-in-data/m-p/369939#M29246</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Marc and Jeff,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I recently started experiencing the same issue with a script. By any chance did you find resolution to your issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Alberto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 08 Feb 2015 23:41:04 GMT</pubDate>
    <dc:creator>AlbertoNieto2</dc:creator>
    <dc:date>2015-02-08T23:41:04Z</dc:date>
    <item>
      <title>Python Crashes on Call to ListLayers in Data-Driven Pages</title>
      <link>https://community.esri.com/t5/python-questions/python-crashes-on-call-to-listlayers-in-data/m-p/369934#M29241</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've created a script to crawl through all the MXD's on our server and log in a CSV the workspaces being used by each MXD.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The script seems to work fine; the thing is, certain MXD's seem to cause Python itself to &lt;/SPAN&gt;&lt;STRONG&gt;crash&lt;/STRONG&gt;&lt;SPAN&gt;. No error messages, or codes, just "Python.exe has stopped working."&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;After tinkering a bit, I found that it seems to be my call to ListLayers that kills everything.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The relevant bit of code is here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;mxd = arcpy.mapping.MapDocument(mxd_file)
wss = [lyr.workspacePath for lyr in arcpy.mapping.ListLayers(mxd)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if lyr.supports('workspacePath')]
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Bizarrely, I can't seem to figure out what's causing Python to crash. The script only seems to fail when it encounters some (but not all) Index Layers for Data Driven Pages...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Even more bizarrely, when the implicated MXD is opened in ArcMap and the script is run in parallel, everything works swimmingly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyone have any clues on what might be going on? I'm using Python 2.6 with an ArcView 10.0 License, SP4. Windows 7, SP 1 64bit.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks a bunch!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Sep 2012 21:22:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-crashes-on-call-to-listlayers-in-data/m-p/369934#M29241</guid>
      <dc:creator>MarcNakleh</dc:creator>
      <dc:date>2012-09-04T21:22:09Z</dc:date>
    </item>
    <item>
      <title>Re: Python Crashes on Call to ListLayers in Data-Driven Pages</title>
      <link>https://community.esri.com/t5/python-questions/python-crashes-on-call-to-listlayers-in-data/m-p/369935#M29242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Additional Info: Trying to Set Data Sources in ArcCatalog causes it to crash, with a "&lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;ArcGIS Desktop has encountered a serious application error&lt;/SPAN&gt;&lt;SPAN&gt;" message.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can send the MXD in question to anyone interested.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Sep 2012 22:12:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-crashes-on-call-to-listlayers-in-data/m-p/369935#M29242</guid>
      <dc:creator>MarcNakleh</dc:creator>
      <dc:date>2012-09-04T22:12:40Z</dc:date>
    </item>
    <item>
      <title>Re: Python Crashes on Call to ListLayers in Data-Driven Pages</title>
      <link>https://community.esri.com/t5/python-questions/python-crashes-on-call-to-listlayers-in-data/m-p/369936#M29243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Can you send a map package along with scripts to &lt;/SPAN&gt;&lt;A href="mailto:jbarrette@esri.com"&gt;jbarrette@esri.com&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2012 13:29:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-crashes-on-call-to-listlayers-in-data/m-p/369936#M29243</guid>
      <dc:creator>JeffBarrette</dc:creator>
      <dc:date>2012-09-05T13:29:12Z</dc:date>
    </item>
    <item>
      <title>Re: Python Crashes on Call to ListLayers in Data-Driven Pages</title>
      <link>https://community.esri.com/t5/python-questions/python-crashes-on-call-to-listlayers-in-data/m-p/369937#M29244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Jeff,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Much obliged! Just sent you the script and the Map Package.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2012 17:32:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-crashes-on-call-to-listlayers-in-data/m-p/369937#M29244</guid>
      <dc:creator>MarcNakleh</dc:creator>
      <dc:date>2012-09-05T17:32:22Z</dc:date>
    </item>
    <item>
      <title>Re: Python Crashes on Call to ListLayers in Data-Driven Pages</title>
      <link>https://community.esri.com/t5/python-questions/python-crashes-on-call-to-listlayers-in-data/m-p/369938#M29245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I did not get the file.&amp;nbsp; I checked my junk folder, etc.&amp;nbsp; Please check the email: &lt;/SPAN&gt;&lt;A href="mailto:jbarrette@esri.com"&gt;jbarrette@esri.com&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2012 13:41:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-crashes-on-call-to-listlayers-in-data/m-p/369938#M29245</guid>
      <dc:creator>JeffBarrette</dc:creator>
      <dc:date>2012-09-06T13:41:33Z</dc:date>
    </item>
    <item>
      <title>Re: Python Crashes on Call to ListLayers in Data-Driven Pages</title>
      <link>https://community.esri.com/t5/python-questions/python-crashes-on-call-to-listlayers-in-data/m-p/369939#M29246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Marc and Jeff,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I recently started experiencing the same issue with a script. By any chance did you find resolution to your issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Alberto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 08 Feb 2015 23:41:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-crashes-on-call-to-listlayers-in-data/m-p/369939#M29246</guid>
      <dc:creator>AlbertoNieto2</dc:creator>
      <dc:date>2015-02-08T23:41:04Z</dc:date>
    </item>
  </channel>
</rss>

