edwinpak

ERROR 999999 - While calling arcpy.ListFields or arcpy.SearchCursor

Discussion created by edwinpak on Dec 16, 2010
Let me first say that I've only been developing with ArcGIS since Nov 2010, so I'm completely new to this. Sucks to be a noob.

What I'm working with: ArcGIS 10 SP1 / Python 2.6.5 / Linux CentOS 5.5 / Windows 7 VM (for ArcMap)

What I'm trying to do with arcpy:
1) Create a new file geodatabase and mosaic dataset (MD)
2) Add rasters (ENVI img) to the MD
3) Build overviews
4) Edit attribute tables (to add a time field)

I have no problems until I check for field names with arcpy.ListFields on an MD and get the error:
RuntimeError: ERROR 999999: Error executing function.
Can't load format DLL

Which traces back to self._gp.ListFields(*gp_fixargs(args))) in __init__.py and geoporcessing/_base.py

I also get a similar error while calling arcpy.SearchCursor on a .mxd including the same MD as a single layer:
RuntimeError: ERROR 999999: Error executing function.
A locator with this name does not exist.

Which trace back to the same init/base scripts.

Could these errors be anymore vague?

Other functions seem to run fine, such as arcpy.ListDatasets, arcpy.mapping.ListLayers.

I've seen this error pop up without rhyme or reason while working with arcpy MD's. The only way I can reproduce this error consistently is by adding a colormap MD function in ArcMap. That is, ListFields/SearchCursor runs successfully on my arcpy generated MD/.mxd, but when I add a colormap function in ArcMap calling ListFields/SearchCursor on the modified MD/.mxd produces these errors.

(By the way, is there an arcpy function to insert a colormap function in mosaic dataset function chain?)

An odd behavior associated with this is: Say I have 2 arcpy generated, error free MD's which I'll refer to as MD1 and MD2. And I add a colormap function to MD1 in ArcMap, but not in MD2. If I ListFields/SearchCursor first on MD2 (w/out colormap), then I can call ListFields/SearchCursor on MD1 without error.

Any suggestions or pointers would greatly be appreciated.

Thanks much
ed

Outcomes