laptop and a wrench

漏洞

A model with the Raster Calculator tool referencing a variable fails with Ukrainian region and language settings.

上次发布: August 25, 2014 ArcGIS for Desktop
漏洞 ID 编号 NIM083013
已提交July 23, 2012
上次修改时间June 5, 2024
适用范围ArcGIS for Desktop
找到的版本10.0
操作系统Windows OS
操作系统版本7
修正版本10.1
状态Fixed

附加信息

Fixed in 10.1

解决办法

The following Python script worked as it uses the locale module:# Import locale moduleimport localelocale.setlocale(locale.LC_NUMERIC, 'Ukrainian_Ukraine')import arcpyfrom <a href="http://arcpy.sa" target="_blank">arcpy.sa</a> import *# Check out any necessary licensesarcpy.CheckOutExtension("spatial")#Variables:hrsm2t = "<a href="file:////csc-hales7d//Incidents//1056521_RC//UA_Model//hrsm2t.tif" target="_blank">\\\\csc-hales7d\\Incidents\\1056521_RC\\UA_Model\\hrsm2t.tif</a>"output = "<a href="file:////csc-hales7d//Incidents//1056521_RC//PythonOutput.tif" target="_blank">\\\\csc-hales7d\\Incidents\\1056521_RC\\PythonOutput.tif</a>"#Calculate Statisticsarcpy.CalculateStatistics_management(hrsm2t, "1", "1", "")#Get Raster PropertiescalcMean = arcpy.GetRasterProperties_management(hrsm2t, "MEAN")meanValue = calcMean.getOutput(0)strValue = str(meanValue)locValue = locale.atof(strValue)#GreaterThantempOutput = GreaterThan(hrsm2t, locValue)tempOutput.save(output)print "done"

重现步骤

漏洞 ID: NIM083013

软件:

  • ArcGIS for Desktop

当漏洞状态发生变化时获得通知

下载 Esri 支持应用程序

发现关于本主题的更多内容

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项