<?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: cursor error in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/cursor-error/m-p/1244478#M66367</link>
    <description>&lt;P&gt;Thank you however, this post was dated back in 2015. Hopefully others can test theirs.&lt;/P&gt;</description>
    <pubDate>Fri, 30 Dec 2022 01:59:39 GMT</pubDate>
    <dc:creator>DEAF_PROBERT_68</dc:creator>
    <dc:date>2022-12-30T01:59:39Z</dc:date>
    <item>
      <title>cursor error</title>
      <link>https://community.esri.com/t5/python-questions/cursor-error/m-p/114439#M8940</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG style="font-family: 'andale mono', times;"&gt;On page 169 of the Programming ArcGIS 10.1 with Python cookbook.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG style="font-family: 'andale mono', times;"&gt;Step 6&amp;nbsp; says to type this : for row in sorted(cursor):&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG style="font-family: 'andale mono', times;"&gt;But if you look at the number 04 which gave the error because PyScripter could not defined cursor ?&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; font-family: 'andale mono', times;"&gt;&lt;SPAN style="font-size: 12pt;"&gt;I have also type this 04 code into Python window and it showed it &lt;/SPAN&gt;&lt;SPAN style="font-size: 16px; line-height: 24px;"&gt;doesn't&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt; defined cursor is ....&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&lt;SPAN style="font-family: 'andale mono', times;"&gt; &lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class="python" name="code"&gt;import arcpy.da arcpy.env.workspace ="c:/ArcpyBook/Ch9" arcpy.da.SearchCursor("Schools.shp",("Facility","Name")) &amp;nbsp;&amp;nbsp; for row in in sorted(cursor): &amp;nbsp;&amp;nbsp;&amp;nbsp; print("School name: " + row[1])&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Feb 2015 19:49:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cursor-error/m-p/114439#M8940</guid>
      <dc:creator>DEAF_PROBERT_68</dc:creator>
      <dc:date>2015-02-15T19:49:06Z</dc:date>
    </item>
    <item>
      <title>Re: cursor error</title>
      <link>https://community.esri.com/t5/python-questions/cursor-error/m-p/114440#M8941</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have two "in"s: "for row in in sorted(cursor):"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Feb 2015 20:19:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cursor-error/m-p/114440#M8941</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2015-02-15T20:19:00Z</dc:date>
    </item>
    <item>
      <title>Re: cursor error</title>
      <link>https://community.esri.com/t5/python-questions/cursor-error/m-p/114441#M8942</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In any case, this is how I usually see and use da cursors:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; with arcpy.da.SearchCursor("YOUR_LAYER_HERE",("ID","FID")) as cursor:
...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in sorted(cursor):
...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print row&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 06:46:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cursor-error/m-p/114441#M8942</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2021-12-11T06:46:54Z</dc:date>
    </item>
    <item>
      <title>Re: cursor error</title>
      <link>https://community.esri.com/t5/python-questions/cursor-error/m-p/114442#M8943</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes that worked !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Feb 2015 21:07:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cursor-error/m-p/114442#M8943</guid>
      <dc:creator>DEAF_PROBERT_68</dc:creator>
      <dc:date>2015-02-15T21:07:05Z</dc:date>
    </item>
    <item>
      <title>Re: cursor error</title>
      <link>https://community.esri.com/t5/python-questions/cursor-error/m-p/1242884#M66320</link>
      <description>&lt;P&gt;Let's check out some ways to fix this problem.&lt;BR /&gt;Double-Check Your Hardware.&amp;nbsp;&lt;BR /&gt;Double-Check Your Mouse's Surface.&amp;nbsp;&lt;BR /&gt;Change Touchpad Settings.&amp;nbsp;&lt;BR /&gt;Disconnect Other Devices.&amp;nbsp;&lt;BR /&gt;Run the Hardware Troubleshooter.&amp;nbsp;&lt;BR /&gt;Update Your Mouse's Drivers.&amp;nbsp;&lt;BR /&gt;Tame Your Mouse.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rachel Gomez&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2022 06:43:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cursor-error/m-p/1242884#M66320</guid>
      <dc:creator>RachelGomez</dc:creator>
      <dc:date>2022-12-21T06:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: cursor error</title>
      <link>https://community.esri.com/t5/python-questions/cursor-error/m-p/1244478#M66367</link>
      <description>&lt;P&gt;Thank you however, this post was dated back in 2015. Hopefully others can test theirs.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Dec 2022 01:59:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cursor-error/m-p/1244478#M66367</guid>
      <dc:creator>DEAF_PROBERT_68</dc:creator>
      <dc:date>2022-12-30T01:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: cursor error</title>
      <link>https://community.esri.com/t5/python-questions/cursor-error/m-p/1244767#M66377</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/637475"&gt;@RachelGomez&lt;/a&gt;&amp;nbsp;, the original question had to do with ArcPy cursors and not computer mouse cursors, so checking hardware and mouse and trackpad settings would have no effect.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jan 2023 15:58:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cursor-error/m-p/1244767#M66377</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2023-01-02T15:58:29Z</dc:date>
    </item>
  </channel>
</rss>

