1

I'm hoping someone can help me understand why I'm getting this error. I have a python script tool that throws this error when it is run through the task scheduler:

Traceback (most recent call last):
  File "C:\Image_Processing\Python_Scripts_Automation_CA\Create_Report_Automation.py", line 474, in <module>
    arcpy.RasterCatalogToRasterDataset_management(pathRasterCatalog, scratchGDB + "/raster1", where_clause="Name = '" + sSingleImage + "'")
  File "c:\program files\arcgis\server\arcpy\arcpy\management.py", line 13319, in RasterCatalogToRasterDataset
    raise e
ExecuteError: ERROR 999999: Error executing function.
The table already exists.
No spatial reference exists.
Failed to execute (RasterCatalogToRasterDataset).

However, when I run it through arcmap, it runs fine. The only difference between the two instances is when I run it through the task scheduler, I use import arcserver, and when I run it through arcmap, I have to comment out that line. At first I thought it was something to do with the raster catalog, but then I started getting the exact same error when I added an arcpy.Clip_management() tool to the code, which doesn't use the raster catalog. And I've checked the spatial references on all of the suspect data, and it does exist. So I'm at a loss. Is it something to do with the scratch GDB?

1
  • You should publish your code (or at least part of it) - it is hard to know what is wrong with that without looking at it :) Apr 26, 2015 at 5:32

1 Answer 1

2

It turns out it was something to do with the scratchGDB. When run in arcmap, the tool used a scratch GDB in a known location (i.e. one I set up). When run from the task scheduler, and the import arcserver was turned on, it used a scratch GDB in the local app data folder. The arc server scratch GDB had existing data, which was causing overwrite issues.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.