AnsweredAssumed Answered

Another search cursor error - cannot concatenate 'str' and 'Cursor' objects

Question asked by jpedder on Aug 2, 2012
Latest reply on Aug 2, 2012 by jpedder
Sorry, yet another frustrating error I'm encountering.

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.

I'm again having trouble with the query and receive the error cannot concatenate 'str' and 'Cursor' objects. Assignment_Number is type short Integer.

Here's the code I'm using.

rows = arcpy.SearchCursor(xCel) row = arcpy.AddMessage("Got Rows" + str(rows) +" from excel")  while row:     arcpy.AddMessage("Start While Loop processing excel sheet")      # Excel Sheet Values     eAssignment = row.getValue("xCel_Assignment_Number")     eDescription = row.getValue("xCel_Description")     eTeam = row.getValue("xCel_Team_Name")      fc1="Assignments"     vAssignment = '"Assignment_Number"' + "='" + str(int(eAssignment)) + "'"      arcpy.AddMessage(eAssignment)          iAssignment = arcpy.SearchCursor(fc1,eAssignment)          arcpy.AddMessage("iAssignment - " + iAssignment)

Thanks in advance for your help