<?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: Weighted Overlay Table Invalid Class in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/weighted-overlay-table-invalid-class/m-p/1233510#M66134</link>
    <description>&lt;P&gt;reformatting the WOTable to make it easier to see what looks off.&lt;/P&gt;&lt;P&gt;for slopeint ... not class 20?&lt;/P&gt;&lt;LI-CODE lang="python"&gt;([[slopeint, 50, "Value",
  RemapValue([[0, 3],
              [1, 3],
			  [2, 3],
			  [3, 3],
			  [4, 3],
			  [5, 3],
			  [6, 3],
			  [7, 3],
			  [8, 3],
			  [9, 3],
			  [10, 3],
			  [11, 3],
			  [12, 3],
			  [13, 2],
			  [14, 2],
			  [15, 1],
			  [16, 'Restricted'],
			  [17, 'Restricted'],
			  [18, 'Restricted'],
			  [19, 'Restricted'],
			  [21, 'Restricted'],
			  [22, 'Restricted'],
			  [23, 'Restricted'],
			  [24, 'Restricted'],
			  ["NODATA", "NODATA"]])], 
  [LandCover, 50, "Class",
  RemapValue([['Open Water', 'Restricted'],
              ['Perennial Snow/Ice', 1],
			  ['Developed, Open Space', 3],
			  ['Developed, Low Intensity', 2],
			  ['Developed, Medium Intensity', 1],
			  ['Developed, High Intensity', 'Restricted'],
			  ['Barren Land', 3],
			  ['Deciduous Forest', 'Restricted'],
			  ['Evergreen Forest', 'Restricted'],
			  ['Mixed Forest', 'Restricted'],
			  ['Shrub/Scrub', 2],
			  ['Herbaceuous', 2],
			  ['Hay/Pasture', 3],
			  ['Cultivated Crops', 3],
			  ['Woody Wetlands', 'Restricted'],
			  ['Emergent Herbaceuous Wetlands',
			  'Restricted'],
			  ['NODATA', 'NODATA']])]], 
   [1, 3, 1])&lt;/LI-CODE&gt;</description>
    <pubDate>Sat, 19 Nov 2022 09:40:18 GMT</pubDate>
    <dc:creator>DanPatterson</dc:creator>
    <dc:date>2022-11-19T09:40:18Z</dc:date>
    <item>
      <title>Weighted Overlay Table Invalid Class</title>
      <link>https://community.esri.com/t5/python-questions/weighted-overlay-table-invalid-class/m-p/1233508#M66133</link>
      <description>&lt;P&gt;I'm trying to run a weighted overlay on two separate integer rasters. I built the original overlay model in arcpro and exported the tool as script. I then modified the script to fit the syntax as shown on the ESRI help pages. Now when I run the script I receive&amp;nbsp;(Unspecified error Class not registered).&amp;nbsp; The landcover and slopeint classes reference existing raster files in the environment gdb. I have cropped out the middle portion of the script that prepares the rasters.&lt;/P&gt;&lt;P&gt;What did I do wrong?&lt;/P&gt;&lt;LI-CODE lang="python"&gt;#Import modules
import arcpy
from arcpy.sa import *
from sys import argv

LandCover = "LandCover"
slopeint = "slopeint"

intable = WOTable([[slopeint, 50, "Value", RemapValue([[0, 3], [1, 3], [2, 3], [3, 3], [4, 3], [5, 3], [6, 3], [7, 3], [8, 3], [9, 3], [10, 3], [11, 3], [12, 3], [13, 2], [14, 2], [15, 1], [16, 'Restricted'], [17, 'Restricted'], [18, 'Restricted'], [19, 'Restricted'], [21, 'Restricted'], [22, 'Restricted'], [23, 'Restricted'], [24, 'Restricted'], ["NODATA", "NODATA"]])], 
                     [LandCover, 50, "Class", RemapValue([['Open Water', 'Restricted'], ['Perennial Snow/Ice', 1], ['Developed, Open Space', 3], ['Developed, Low Intensity', 2], ['Developed, Medium Intensity', 1], ['Developed, High Intensity', 'Restricted'], ['Barren Land', 3], ['Deciduous Forest', 'Restricted'], ['Evergreen Forest', 'Restricted'], ['Mixed Forest', 'Restricted'], ['Shrub/Scrub', 2], ['Herbaceuous', 2], ['Hay/Pasture', 3], ['Cultivated Crops', 3], ['Woody Wetlands', 'Restricted'], ['Emergent Herbaceuous Wetlands', 'Restricted'], ['NODATA', 'NODATA']])]], 
                    [1, 3, 1])
helicoptersuitability = WeightedOverlay(intable)
helicoptersuitability.save("helicoptersuitability")&lt;/LI-CODE&gt;&lt;P&gt;Error Message:&lt;/P&gt;&lt;P&gt;Traceback (most recent call last):&lt;BR /&gt;File "D:\Documents\School\USC\586\586_Project_5\Project_5\SiteSuitability.py", line 78, in &amp;lt;module&amp;gt;&lt;BR /&gt;helicoptersuitability = WeightedOverlay(intable)&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\sa\Functions.py", line 10452, in WeightedOverlay&lt;BR /&gt;return Wrapper(&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\sa\Utils.py", line 55, in swapper&lt;BR /&gt;result = wrapper(*args, **kwargs)&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\sa\Functions.py", line 10449, in Wrapper&lt;BR /&gt;result = arcpy.sa.Apply(rasters, "WeightedOverlay", args)&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\ia\_ia.py", line 135, in Apply&lt;BR /&gt;return arcgisscripting._ia.Apply(in_raster=in_raster,&lt;BR /&gt;RuntimeError: Failed to apply Raster Function: 'WeightedOverlay' (Unspecified error&lt;BR /&gt;Class not registered&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 19 Nov 2022 08:10:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/weighted-overlay-table-invalid-class/m-p/1233508#M66133</guid>
      <dc:creator>JacobSpear1</dc:creator>
      <dc:date>2022-11-19T08:10:13Z</dc:date>
    </item>
    <item>
      <title>Re: Weighted Overlay Table Invalid Class</title>
      <link>https://community.esri.com/t5/python-questions/weighted-overlay-table-invalid-class/m-p/1233510#M66134</link>
      <description>&lt;P&gt;reformatting the WOTable to make it easier to see what looks off.&lt;/P&gt;&lt;P&gt;for slopeint ... not class 20?&lt;/P&gt;&lt;LI-CODE lang="python"&gt;([[slopeint, 50, "Value",
  RemapValue([[0, 3],
              [1, 3],
			  [2, 3],
			  [3, 3],
			  [4, 3],
			  [5, 3],
			  [6, 3],
			  [7, 3],
			  [8, 3],
			  [9, 3],
			  [10, 3],
			  [11, 3],
			  [12, 3],
			  [13, 2],
			  [14, 2],
			  [15, 1],
			  [16, 'Restricted'],
			  [17, 'Restricted'],
			  [18, 'Restricted'],
			  [19, 'Restricted'],
			  [21, 'Restricted'],
			  [22, 'Restricted'],
			  [23, 'Restricted'],
			  [24, 'Restricted'],
			  ["NODATA", "NODATA"]])], 
  [LandCover, 50, "Class",
  RemapValue([['Open Water', 'Restricted'],
              ['Perennial Snow/Ice', 1],
			  ['Developed, Open Space', 3],
			  ['Developed, Low Intensity', 2],
			  ['Developed, Medium Intensity', 1],
			  ['Developed, High Intensity', 'Restricted'],
			  ['Barren Land', 3],
			  ['Deciduous Forest', 'Restricted'],
			  ['Evergreen Forest', 'Restricted'],
			  ['Mixed Forest', 'Restricted'],
			  ['Shrub/Scrub', 2],
			  ['Herbaceuous', 2],
			  ['Hay/Pasture', 3],
			  ['Cultivated Crops', 3],
			  ['Woody Wetlands', 'Restricted'],
			  ['Emergent Herbaceuous Wetlands',
			  'Restricted'],
			  ['NODATA', 'NODATA']])]], 
   [1, 3, 1])&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 19 Nov 2022 09:40:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/weighted-overlay-table-invalid-class/m-p/1233510#M66134</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2022-11-19T09:40:18Z</dc:date>
    </item>
    <item>
      <title>Re: Weighted Overlay Table Invalid Class</title>
      <link>https://community.esri.com/t5/python-questions/weighted-overlay-table-invalid-class/m-p/1233521#M66137</link>
      <description>&lt;P&gt;I just corrected that but no change in the error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;This is the code as generated form arcpro if I were to export the tool as python&lt;/P&gt;&lt;LI-CODE lang="python"&gt;out_raster = arcpy.sa.WeightedOverlay(r"('D:\Documents\School\USC\586\586_Project_5\Project_5\Project_5.gdb\slopeint' 50 'Value' (0 3; 1 3; 2 3; 3 3; 4 3; 5 3; 6 3; 7 3; 8 3; 9 3; 10 3; 11 3; 12 3; 13 2; 14 2; 15 1; 16 Restricted; 17 Restricted; 18 Restricted; 19 Restricted; 21 Restricted; 22 Restricted; 23 Restricted; 24 Restricted; NODATA NODATA);
'D:\Documents\School\USC\586\586_Project_5\Project_5\Project_5.gdb\LandCover' 50 'Class' ('Open Water' Restricted; 'Perennial Snow/Ice' 2; 'Developed, Open Space' 3; 'Developed, Low Intensity' 2; 'Developed, Medium Intensity' 1; 'Developed, High Intensity' Restricted; 'Barren Land' 3; 'Deciduous Forest' Restricted; 'Evergreen Forest' Restricted; 'Mixed Forest' Restricted; 'Shrub/Scrub' 2; 'Herbaceuous' 2; 'Hay/Pasture' 3; 'Cultivated Crops' 3; 'Woody Wetlands' Restricted; 'Emergent Herbaceuous Wetlands' Restricted; NODATA NODATA))
;1 3 1"); 
out_raster.save(r"D:\Documents\School\USC\586\586_Project_5\Project_5\Project_5.gdb\suitabilityoverlay")&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 19 Nov 2022 17:10:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/weighted-overlay-table-invalid-class/m-p/1233521#M66137</guid>
      <dc:creator>JacobSpear1</dc:creator>
      <dc:date>2022-11-19T17:10:26Z</dc:date>
    </item>
    <item>
      <title>Re: Weighted Overlay Table Invalid Class</title>
      <link>https://community.esri.com/t5/python-questions/weighted-overlay-table-invalid-class/m-p/1233529#M66138</link>
      <description>&lt;P&gt;I don't know.&amp;nbsp; But even though the whole input to the weighted overlay tool is raw encoded (r" ... ) the paths of the inputs and outputs are not.&lt;/P&gt;&lt;P&gt;'D:\Documents\School\USC\586\586_Project_5\Project_5\Project_5.gdb\slopeint'&lt;/P&gt;&lt;P&gt;yields errors which vanish when done as&lt;/P&gt;&lt;P&gt;r'D:\Documents\School\USC\586\586_Project_5\Project_5\Project_5.gdb\slopeint'&lt;/P&gt;&lt;P&gt;You might want to try different gdb (saving location or raw encode the file paths in the above lines and try it from within your python IDE&lt;/P&gt;</description>
      <pubDate>Sat, 19 Nov 2022 19:54:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/weighted-overlay-table-invalid-class/m-p/1233529#M66138</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2022-11-19T19:54:39Z</dc:date>
    </item>
  </channel>
</rss>

