<div>Hi again users,</div>
<div> </div>
<div>This is in response to my post from 11/14/2010 (see below)</div>
<div> </div>
<div>><i> Hi users,<br></i>><i> I'm using Python 2.5 (in concert with ArcGIS 9.3) to convert a raster to<br></i>><i> an ASCII file. I used the code (listed below) several weeks ago to<br></i>><i> successfully do the conversion, but when I tried to replicate it a few<br>
</i>><i> days ago, I got an error message.<br></i>><i> import arcgisscripting<br></i>><i> gp = arcgisscripting.create(9.3)<br></i>><i> InRaster = "C:/data/raster1"<br></i>><i> OutAsciiFile = "C:/data/raster2ascii.asc"<br>
</i>><i> gp.RasterToASCII_conversion(InRaster, OutAsciiFile)<br></i>><i> The error message:<br></i>><i> arcgisscripting.ExecuteError: Failed to execute. Parameters are not<br></i>><i> valid. raster1 does not exist.<br>
</i>><i> My file path has not changed so I don't understand why Python can no<br></i>><i> longer recognize my raster file. Any ideas?<br></i>><i><br></i></div>
<div>MRAB responded:</div>
<div>Just to make sure, does os.path.isfile(InRaster) return True?</div>
<div> </div>
<div>When I tried os.path.isfile(InRaster), I received the following error message:</div>
<div>"NameError: name 'os' is not defined"</div>
<div> </div>
<div>Does this shed any light on why my raster to ASCII conversion isn't working?</div>
<div> </div>
<div>Thanks again.<br></div>