Unable to remove name of raster from geodatabase

1292
6
09-16-2019 09:32 AM
WadeWall
Occasional Contributor

Hi all,

Sometimes, I am unable to remove rasters from a geodatabase that I have created. Even though the name continues to appear in the geodatabase, it is not "really" there. Does anyone else experience this? Is there a way to delete the names of rasters that don't exist anymore, without having to simply create a new geodatabase?

Here is an example:

arcpy.ListRasters("*")
Out[13]:
['image',
 'dem',
 'tmpr1pqjrdo',
 'Segmented_201909121301327226310_interIndex',
 'image2019']

arcpy.Delete_management('tmpr1pqjrdo')
Out[14]: <Result 'true'>

arcpy.ListRasters("*")
Out[15]:
['image',
 'dem',
 'tmpr1pqjrdo',
 'Segmented_201909121301327226310_interIndex',
 'image2019']

You can see that the image name is still there. However, tempRast = arcpy.Raster('tmpr1pqjrdo') results in an error that states the raster doesn't exist.

0 Kudos
6 Replies
DanPatterson_Retired
MVP Emeritus

Try saving the project after deletion to see if the gdb gets updated.

0 Kudos
WadeWall
Occasional Contributor

I have tried that, and the rasters are still in the geodatabase. This has happened to me on multiple computers in both Arcgis 10.x and Pro. It is annoying to have to create a new geodatabase every time this happens.

0 Kudos
DanPatterson_Retired
MVP Emeritus

It has popped up before

NIM003288: Cannot delete raster (grid) when first attempt to de.. 

and associated bugs/references

other references

Assuming that they are just plain gdb rasters and not part of mosaic datasets or similar raster packaging forms? (there are different tools for those)

0 Kudos
WadeWall
Occasional Contributor

Thanks Dan,

Your links do suggest that this is a known issue. As far as I can tell, there aren't any solutions provided. It has been a pain for me for quite some time and just keeps clogging up my geodatabases. Should I report it as a bug?

Wade

0 Kudos
DanPatterson_Retired
MVP Emeritus

I would Wade, since it pops up in various incarnations.  Tech support will probably need test data and details of your workflow.  Worth a shot

PavanYadav
Esri Contributor

Thanks Dan. We do need some additional information. NIM003288 is very old and I believe it was fixed at v9.2.

Wade Wall‌ Deleting a raster should remove all corresponding entries. If you can contact Support and share you case ID I will work with the analyst. There are two possibilities:

1.  A specific workflow is leading to the behavior. If so, it should be logged as a defect.

2. For any reasons, your FGDB got corrupted. We can potentially review the gdb system tables for the orphan names.

Here is Support contact info: Esri Support Contact Support 


If you are not current on maintenance, please send me an email at pyadav AT esr.com.

Regards,

Pavan

Pavan Yadav | Technology Lead

Esri Support Services, Esri | 380 New York Street, Redlands CA 92373 | USA

T 909-793-2853  | pyadav AT esri.com | esri.com

 

THE SCIENCE OF WHERE ®

0 Kudos