Timeline for A column was specified that does not exist - Error when running Select Layer By Attribute tool
Current License: CC BY-SA 3.0
13 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Dec 22, 2016 at 20:21 | vote | accept | Laura | ||
Dec 22, 2016 at 20:01 | history | edited | PolyGeo♦ | CC BY-SA 3.0 |
deleted 29 characters in body
|
Dec 22, 2016 at 19:52 | history | edited | PolyGeo♦ |
edited tags
|
|
Dec 22, 2016 at 18:48 | history | edited | Laura | CC BY-SA 3.0 |
added 170 characters in body
|
Dec 22, 2016 at 18:44 | comment | added | FelixIP | Is extent set to union of inputs? | |
Dec 22, 2016 at 18:40 | history | edited | Laura | CC BY-SA 3.0 |
I updated the question to include current code that I'm working that includes the suggestions from some of the comments.
|
Dec 22, 2016 at 18:30 | comment | added | Laura | Somehow, the FieldCalculator worked (not sure what I changed to make it work), so now I have a short integer field called gridvalue in the shapefile populated with the values from GRIDCODE, but I am still getting the same error about a column being specified that does not exist when I try to select by attribute. | |
Dec 22, 2016 at 18:04 | comment | added | Laura | UPDATE: I tried to create a new field in the shapefile and populate it using this line: arcpy.CalculateField_management(fc, 'gridvalue', "!GRIDCODE!", 'PYTHON'), and I got the same error but for this new line now. I am assuming this is because of using GRIDCODE here too. Is there a way to name the fields when the raster is converted to a polygon that could circumvent this issue from the beginning? | |
Dec 22, 2016 at 17:50 | comment | added | Bera | Check out AddFieldDelimiters: pro.arcgis.com/en/pro-app/arcpy/functions/… | |
Dec 22, 2016 at 17:44 | comment | added | Laura | I was wondering if it was something like this. To move the values to another field, though, won't I have to use the field name 'GRIDCODE' also? For example, if I create a new field and populate it using CalculateField, I will have to use 'GRIDCODE' in the CalculateField expression, right?. A thought I just had - could I possibly create the query variable by indexing the fields to get the GRIDCODE field? E.g., fields = arcpy.ListFields(fc) --> field = fields[3].name --> build query using this field variable? | |
Dec 22, 2016 at 17:36 | answer | added | Ben S Nadler | timeline score: 0 | |
Dec 22, 2016 at 17:27 | comment | added | FelixIP | Strange but true, arcgis has issues with field name called "gridcode". Move values to another integer field | |
Dec 22, 2016 at 17:09 | history | asked | Laura | CC BY-SA 3.0 |