laptop and a wrench

Error

ListRasters function syntax returns nothing in Python 2.4, but works as expected in Python 2.1.

Última publicación: August 25, 2014 No Product Found
Número de ID del error NIM035241
EnviadoMay 14, 2008
Última modificaciónJune 5, 2024
Relacionado conNo Product Found
Versión encontrada9.2
EstadoNon-Reproducible

Información adicional

No Public Explanation

Solución alternativa

Changing gp.ListRasters("*", "TIFF") to gp.ListRasters("*", "TIF") seems to have fixed the problem in some cases. Here is the code that seems to works every time in Python 2.4 :~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#import win32com.client, sys, string, os#gp = win32com.client.Dispatch("esriGeoprocessing.GPDispatch.1")import arcgisscripting, sysgp = arcgisscripting.create()gp.setproduct("arcinfo")gp.workspace = r"<a href="file:C:/TEMP" target="_blank">C:\TEMP</a>"# Get a list of grids in the workspace.rasters = gp.ListRasters("*", "TIF")raster = rasters.next()while raster: print raster raster = rasters.next()del gp~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Pasos para reproducir

ID del error: NIM035241

Software:

  • No Product Found

Recibir notificaciones cuando cambie el estado de un error

Descargar la aplicación de soporte de Esri

Descubrir más sobre este tema

Obtener ayuda de expertos en ArcGIS

Contactar con el soporte técnico

Descargar la aplicación de soporte de Esri

Ir a opciones de descarga