<?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: Error returning Shape extent in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/error-returning-shape-extent/m-p/1032527#M60187</link>
    <description>&lt;P&gt;It probably would, but you'd need to give it a non-spatial field on which to sort.&lt;/P&gt;</description>
    <pubDate>Wed, 03 Mar 2021 17:30:57 GMT</pubDate>
    <dc:creator>jcarlson</dc:creator>
    <dc:date>2021-03-03T17:30:57Z</dc:date>
    <item>
      <title>Error returning Shape extent</title>
      <link>https://community.esri.com/t5/python-questions/error-returning-shape-extent/m-p/1032508#M60185</link>
      <description>&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;I am using the ESRI example to try and return the Features extent, getting an error:&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/classes/extent.htm#C_GUID-78388B9D-AD1B-4B8B-B959-A96C022B3CE9" target="_blank" rel="noopener"&gt;Extent—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class="ansi-red-fg"&gt;TypeError&lt;/SPAN&gt;: '&amp;lt;' not supported between instances of 'Polyline' and 'Polyline'&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;The error is at the for row in sorted:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;for dirpath, dirnames, filenames in arcpy.da.Walk(workspace, topdown=True, datatype=data_type): 
    #datasets = [''] + datasets if datasets is not None else []
    for filename in filenames:
            for row in sorted(arcpy.da.SearchCursor(filename, ['Shape@'])):
                #print(filename)
                extent = row[0].extent
                print(filename, extent)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate any pointers.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Clive&lt;/P&gt;</description>
      <pubDate>Wed, 03 Mar 2021 17:09:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-returning-shape-extent/m-p/1032508#M60185</guid>
      <dc:creator>CliveSwan</dc:creator>
      <dc:date>2021-03-03T17:09:45Z</dc:date>
    </item>
    <item>
      <title>Re: Error returning Shape extent</title>
      <link>https://community.esri.com/t5/python-questions/error-returning-shape-extent/m-p/1032517#M60186</link>
      <description>&lt;P&gt;It didn't like the sorted..&lt;/P&gt;</description>
      <pubDate>Wed, 03 Mar 2021 17:15:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-returning-shape-extent/m-p/1032517#M60186</guid>
      <dc:creator>CliveSwan</dc:creator>
      <dc:date>2021-03-03T17:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: Error returning Shape extent</title>
      <link>https://community.esri.com/t5/python-questions/error-returning-shape-extent/m-p/1032527#M60187</link>
      <description>&lt;P&gt;It probably would, but you'd need to give it a non-spatial field on which to sort.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Mar 2021 17:30:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/error-returning-shape-extent/m-p/1032527#M60187</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2021-03-03T17:30:57Z</dc:date>
    </item>
  </channel>
</rss>

