<?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: Another search cursor error - cannot concatenate 'str' and 'Cursor' objects in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/another-search-cursor-error-cannot-concatenate-str/m-p/545638#M42562</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sometimes it just takes a train ride to rethink the problem. It was actually the arcpy.addmessage that was teh issue, not the query. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sorry to trouble you all&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jon&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Aug 2012 15:48:13 GMT</pubDate>
    <dc:creator>JonPedder</dc:creator>
    <dc:date>2012-08-02T15:48:13Z</dc:date>
    <item>
      <title>Another search cursor error - cannot concatenate 'str' and 'Cursor' objects</title>
      <link>https://community.esri.com/t5/python-questions/another-search-cursor-error-cannot-concatenate-str/m-p/545637#M42561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sorry, yet another frustrating error I'm encountering. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm reading data from an Excel sheet, first column is xCel_Assignment_Number. Then will be matching the value from xCel_Assignment_Number to FC Assignments, field Assignment_Number. Then updating the information in the FC with data from the spreadsheet.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm again having trouble with the query and receive the error cannot concatenate 'str' and 'Cursor' objects. Assignment_Number is type short Integer. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's the code I'm using. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;rows = arcpy.SearchCursor(xCel) row = rows.next() arcpy.AddMessage("Got Rows" + str(rows) +" from excel")&amp;nbsp; while row: &amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage("Start While Loop processing excel sheet")&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; # Excel Sheet Values &amp;nbsp;&amp;nbsp;&amp;nbsp; eAssignment = row.getValue("xCel_Assignment_Number") &amp;nbsp;&amp;nbsp;&amp;nbsp; eDescription = row.getValue("xCel_Description") &amp;nbsp;&amp;nbsp;&amp;nbsp; eTeam = row.getValue("xCel_Team_Name")&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; fc1="Assignments" &amp;nbsp;&amp;nbsp;&amp;nbsp; vAssignment = '"Assignment_Number"' + "='" + str(int(eAssignment)) + "'"&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage(eAssignment) &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; iAssignment = arcpy.SearchCursor(fc1,eAssignment) &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage("iAssignment - " + iAssignment)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance for your help&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2012 13:45:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/another-search-cursor-error-cannot-concatenate-str/m-p/545637#M42561</guid>
      <dc:creator>JonPedder</dc:creator>
      <dc:date>2012-08-02T13:45:21Z</dc:date>
    </item>
    <item>
      <title>Re: Another search cursor error - cannot concatenate 'str' and 'Cursor' objects</title>
      <link>https://community.esri.com/t5/python-questions/another-search-cursor-error-cannot-concatenate-str/m-p/545638#M42562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sometimes it just takes a train ride to rethink the problem. It was actually the arcpy.addmessage that was teh issue, not the query. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sorry to trouble you all&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jon&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2012 15:48:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/another-search-cursor-error-cannot-concatenate-str/m-p/545638#M42562</guid>
      <dc:creator>JonPedder</dc:creator>
      <dc:date>2012-08-02T15:48:13Z</dc:date>
    </item>
  </channel>
</rss>

