Error 010067 Ascii to Raster Help (still having problem after trying all forum fixes)

03-06-2012 08:17 AM
New Contributor
Hi Everyone,
I have a Python script that should convert a Surfer Grid to Ascii, then convert the Ascii to Raster and then make contours from the raster. I've been having problems with the dreaded 010067 Error in executing grid expression. The part of the code that makes the ascii file came from David Finlayson Ph. D. and I've been using it for years to make ascii files from Surfer grids - Thanks David!

I have checked all the ascii header information and cannot see anything wrong and the same ascii files processes just fine through the toolbox version of Ascii to Raster. I have also ensured that there are no spaces in the pathway to the data and project, and that the Windows environment variables are set to non- space pathways. I have attempted to run it (along with changing all the workspace pathways and pathways in the code) on both the server location and my local hard drive. Nothing seems to work to fix the problem.

I'm hoping someone here can review the attachments - the error listing, python code (ErrorAndCode.txt), and ascii sample (mytest.txt) and help me out. I'd really like to get it working because I have a large model that it needs to fit into.

Note: When looking at the Executing line of the error listing, the word "Shallow" at the end of the line is in reference to a string collected so that the name of the contour file will be unique.

Thanks in advance,
Jewell Brannigan
GIS Analyst
0 Kudos
1 Reply
Esri Esteemed Contributor
Hi Jewell,

Troubleshooting this may be a little difficult not having the 'Surfer' application.  Do you have the output that is created from the following line:

surfer.GridTransform(InGrid=inSurfGrid, Operation=operation, OutGrid=tmpfile, OutFmt=grdformat)

I believe it will be a 'temp.grd' file.
0 Kudos