<?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: What is causing my ArcGIS Pro to crash when running this Python code through the Python Window in ArcPro? in Python Snippets Questions</title>
    <link>https://community.esri.com/t5/python-snippets-questions/what-is-causing-my-arcgis-pro-to-crash-when/m-p/835235#M447</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So I tried this. It worked and it gave me the the details of the output and loaded onto into contents of the map. Why, when run again does it crash? I am just inputting the arcpy.makefeature layer... function, nothing else.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Dec 2019 20:00:52 GMT</pubDate>
    <dc:creator>CurtisOverholt</dc:creator>
    <dc:date>2019-12-10T20:00:52Z</dc:date>
    <item>
      <title>What is causing my ArcGIS Pro to crash when running this Python code through the Python Window in ArcPro?</title>
      <link>https://community.esri.com/t5/python-snippets-questions/what-is-causing-my-arcgis-pro-to-crash-when/m-p/835233#M445</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;a&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;management&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;SelectLayerByAttribute&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"(SHAPE_IN_CONTENTS)"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"NEW_SELECTION"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"LEASE_NAME LIKE 'ABC%'"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; None&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;



arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;management&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;CopyFeatures&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"(SHAPE_IN_CONTENTS)"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;"C:\Data\GIS\Project\Python\Python.gdb\(SELECTED_SHAPE)"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; None&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; None&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; None&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; None&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;



arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;management&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Dissolve&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"(SELECTED_SHAPE"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;"C:\Data\GIS\Project\Python\Python.gdb\(SELECTED_SHAPE_DISSOLVE)"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; None&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; None&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"MULTI_PART"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"DISSOLVE_LINES"&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Shapefile name is within ( )&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can run each line separately. I can run 2-3 separately. Occasionally 1-3 work, 1-2 work, 2-3 works 100% of the time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm wondering if I need to add code between line 2-3 to reference the file?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I try to run the entire code, the trailling dots freeze and windows says ArcGIS Pro has stopped working&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:07:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-snippets-questions/what-is-causing-my-arcgis-pro-to-crash-when/m-p/835233#M445</guid>
      <dc:creator>CurtisOverholt</dc:creator>
      <dc:date>2021-12-12T10:07:57Z</dc:date>
    </item>
    <item>
      <title>Re: What is causing my ArcGIS Pro to crash when running this Python code through the Python Window in ArcPro?</title>
      <link>https://community.esri.com/t5/python-snippets-questions/what-is-causing-my-arcgis-pro-to-crash-when/m-p/835234#M446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See&amp;nbsp;&lt;A href="https://community.esri.com/thread/245173"&gt;Error 999999 in arcpy after ArcGIS Pro Crashes&lt;/A&gt;&amp;nbsp; on how to format your code so it's more readable. One thing that I notice is your selection; I always create a&lt;A href="https://pro.arcgis.com/en/pro-app/tool-reference/data-management/make-feature-layer.htm"&gt; feature layer &lt;/A&gt;or a &lt;A href="https://pro.arcgis.com/en/pro-app/tool-reference/data-management/make-table-view.htm"&gt;table view&lt;/A&gt; first and make the selections against them...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Dec 2019 19:27:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-snippets-questions/what-is-causing-my-arcgis-pro-to-crash-when/m-p/835234#M446</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2019-12-10T19:27:28Z</dc:date>
    </item>
    <item>
      <title>Re: What is causing my ArcGIS Pro to crash when running this Python code through the Python Window in ArcPro?</title>
      <link>https://community.esri.com/t5/python-snippets-questions/what-is-causing-my-arcgis-pro-to-crash-when/m-p/835235#M447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So I tried this. It worked and it gave me the the details of the output and loaded onto into contents of the map. Why, when run again does it crash? I am just inputting the arcpy.makefeature layer... function, nothing else.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Dec 2019 20:00:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-snippets-questions/what-is-causing-my-arcgis-pro-to-crash-when/m-p/835235#M447</guid>
      <dc:creator>CurtisOverholt</dc:creator>
      <dc:date>2019-12-10T20:00:52Z</dc:date>
    </item>
    <item>
      <title>Re: What is causing my ArcGIS Pro to crash when running this Python code through the Python Window in ArcPro?</title>
      <link>https://community.esri.com/t5/python-snippets-questions/what-is-causing-my-arcgis-pro-to-crash-when/m-p/835236#M448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are running it again without quitting and restarting your pro project, you're trying to create the feature layer again of the same name but that name space is already spoken for 'in_memory' which is where the feature layer is held.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's not giving you an error to that effect?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the following code snippet I create a table view called 'tv' and make a selection against.&amp;nbsp; If I wanted to try this again in a python window in Pro, I'd run line 1 again but substitute 'tv2' for 'tv' and then substitute 'tv2' for 'tv' in line 4&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;MakeTableView_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;centerlinesSource&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'tv'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
select &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'JOINID is not null and AN_NAME is not null and AN_POSTDIR is not null'&lt;/SPAN&gt;

arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;SelectLayerByAttribute_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'tv'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'NEW_SELECTION'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;select&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

blah blah blah‍‍‍‍‍‍&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;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:07:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-snippets-questions/what-is-causing-my-arcgis-pro-to-crash-when/m-p/835236#M448</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2021-12-12T10:07:59Z</dc:date>
    </item>
  </channel>
</rss>

