<?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: Geoprocessing Error Python in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-error-python/m-p/1212738#M26480</link>
    <description>&lt;P&gt;Instead of the select by attribute, try using a make feature layer with where clause, then copy the feature layer to a new fc.&lt;/P&gt;&lt;P&gt;Might also try adding something like int(arcpy.GetCount_management(out_lyr).getOutput(0)) right after the select by atts and see how many are actually being selected.&lt;/P&gt;&lt;P&gt;R_&lt;/P&gt;</description>
    <pubDate>Wed, 14 Sep 2022 23:19:27 GMT</pubDate>
    <dc:creator>RhettZufelt</dc:creator>
    <dc:date>2022-09-14T23:19:27Z</dc:date>
    <item>
      <title>Geoprocessing Error Python</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-error-python/m-p/1212693#M26477</link>
      <description>&lt;P&gt;I am working on a project for school and I am trying to create new layers from an existing shp based on attributes. The problem I am having now is that the select by attributes is not actually selecting the appropriate items and exports a layer with the same amount of points as the first layer. I have double and triple checked I have the correct spelling of the data field and attributes. I have also used numerous other methods of creating the expression which return an invalid expression error.&lt;/P&gt;&lt;P&gt;The first screenshot is the error I get with an improper syntax for the SQL query. The second screenshot is the result of the code with a "working" syntax but it creates a new layer with a new name but is otherwise the exact same. Finally, the third screenshot is the csv used as the input.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 21:20:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-error-python/m-p/1212693#M26477</guid>
      <dc:creator>JacobSpear1</dc:creator>
      <dc:date>2022-09-14T21:20:41Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing Error Python</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-error-python/m-p/1212708#M26478</link>
      <description>&lt;P&gt;Try running the geoprocessing tool select by attribute manually in arcmap/pro when correct and it's selecting the appropriate records you can copy the python code from the geoprocessing history. Basically the syntax for your where expression isn't right but running the tool manually will help you create it correctly.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 22:10:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-error-python/m-p/1212708#M26478</guid>
      <dc:creator>graeme_hill</dc:creator>
      <dc:date>2022-09-14T22:10:09Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing Error Python</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-error-python/m-p/1212730#M26479</link>
      <description>&lt;P&gt;I just tried that and received the same result. The selection query had an underscore after DESC which I assume is just a typo on my part, but it ran with no issues but still created a layer with the same amount of points.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 22:37:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-error-python/m-p/1212730#M26479</guid>
      <dc:creator>JacobSpear1</dc:creator>
      <dc:date>2022-09-14T22:37:00Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing Error Python</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-error-python/m-p/1212738#M26480</link>
      <description>&lt;P&gt;Instead of the select by attribute, try using a make feature layer with where clause, then copy the feature layer to a new fc.&lt;/P&gt;&lt;P&gt;Might also try adding something like int(arcpy.GetCount_management(out_lyr).getOutput(0)) right after the select by atts and see how many are actually being selected.&lt;/P&gt;&lt;P&gt;R_&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 23:19:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-error-python/m-p/1212738#M26480</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2022-09-14T23:19:27Z</dc:date>
    </item>
    <item>
      <title>Re: Geoprocessing Error Python</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-error-python/m-p/1212756#M26481</link>
      <description>&lt;P&gt;This worked! I completely ignored the select line of code and used feature class to feature class with the above suggestion for the SQL expression and got the intended result!&lt;/P&gt;&lt;P&gt;Below is the line of code that worked. I simply changed the variables for each item as necessary&lt;/P&gt;&lt;P&gt;arcpy.conversion.FeatureClassToFeatureClass(out_lyr, "", lived, "DES = 'lived'")&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2022 01:13:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/geoprocessing-error-python/m-p/1212756#M26481</guid>
      <dc:creator>JacobSpear1</dc:creator>
      <dc:date>2022-09-15T01:13:22Z</dc:date>
    </item>
  </channel>
</rss>

