laptop and a wrench

不具合

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

最後に公開された状態: August 25, 2014 No Product Found
不具合 ID 番号 NIM035241
送信されましたMay 14, 2008
最終更新日June 5, 2024
適用対象No Product Found
見つかったバージョン9.2
ステータスNon-Reproducible

参考情報

No Public Explanation

対処法

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~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

再現の手順

不具合 ID: NIM035241

ソフトウェア:

  • No Product Found

バグのステータスが変更されたときに通知を受け取る

Esri Support アプリのダウンロード

このトピックについてさらに調べる

ArcGIS エキスパートのサポートを受ける

テクニカル サポートへのお問い合わせ

Esri Support アプリのダウンロード

ダウンロード オプションに移動