[Beginner question] Raster to ASCII

Becky Kern kern.ra at gmail.com
Sun Nov 14 20:07:40 CET 2010

Hi users,

I'm using Python 2.5 (in concert with ArcGIS 9.3) to convert a raster to an
ASCII file. I used the code (listed below) several weeks ago to successfully
do the conversion, but when I tried to replicate it a few days ago, I got an
error message.

import arcgisscripting
gp = arcgisscripting.create(9.3)
InRaster = "C:/data/raster1"
OutAsciiFile = "C:/data/raster2ascii.asc"
gp.RasterToASCII_conversion(InRaster, OutAsciiFile)

The error message:

arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.
raster1 does not exist.

My file path has not changed so I don't understand why Python can no longer
recognize my raster file. Any ideas?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20101114/ce7c3056/attachment.html>

More information about the Python-list mailing list