AnsweredAssumed Answered

ArcPy looses database connection?

Question asked by JerryGarcia on May 14, 2018

It appears I keep losing my database connection?  I am looping.  The first 6 or 20 or so operations execute fine, but then it appears I loose the database connection?  There is a pause, then a rapid fire of errors.  Once it loses a connection, it does not recover.

 

Any suggestions?  Thanks!

 

testSQLCreatorConnection = r"D:\PWDs\SDE_Connection_Files\agren-gis-test-DataCreator.sde"

inAllDEMMosaicDataset = r"\GIS.DATACREATOR.all_dem"

inAllDEMMosaicDatasetFullPath = testSQLCreatorConnection + inAllDEMMosaicDataset

 

result = arcpy.GetCellValue_management(in_raster=inAllDEMMosaicDatasetFullPath, location_point=str(point['x'])+ " " + str(point['y']), band_index="")

 

EXAMPLE LOG File:

INFO:root:QADEMData: START
INFO:root:2018-05-14 11:39:04.494000 Status: 0, cellSize: 0, cellValue: 69.924477
INFO:root:2018-05-14 11:39:09.009000 Status: 0, cellSize: 0, cellValue: 69.924477
INFO:root:2018-05-14 11:39:14.822000 Status: 0, cellSize: 0, cellValue: 439.92664
INFO:root:2018-05-14 11:39:20.462000 Status: 0, cellSize: 0, cellValue: 406.72403
INFO:root:2018-05-14 11:39:26.071000 Status: 0, cellSize: 0, cellValue: 601.04382
INFO:root:2018-05-14 11:39:31.618000 Status: 0, cellSize: 0, cellValue: 601.04382
INFO:root:2018-05-14 11:39:37.180000 Status: 0, cellSize: 0, cellValue: 398.90991
INFO:root:2018-05-14 11:39:42.743000 Status: 0, cellSize: 0, cellValue: 398.90991
INFO:root:2018-05-14 11:39:48.399000 Status: 0, cellSize: 0, cellValue: 398.90991
INFO:root:2018-05-14 11:39:54.055000 Status: 1, cellSize: 0, cellValue: NoData
INFO:root:2018-05-14 11:39:59.399000 Status: 1, cellSize: 0, cellValue: NoData
INFO:root:2018-05-14 11:40:05.305000 Status: 1, cellSize: 0, cellValue: NoData
ERROR:root: File "D:\QAData\QAData.py", line 112, in QADEMData
result = arcpy.GetCellValue_management(in_raster=inAllDEMMosaicDatasetFullPath, location_point=str(point['x'])+ " " + str(point['y']), band_index="")
Failed to execute. Parameters are not valid.
ERROR 000732: Input Raster: Dataset D:\PWDs\SDE_Connection_Files\agren-gis-test-DataCreator.sde\GIS.DATACREATOR.all_dem does not exist or is not supported
Failed to execute (GetCellValue).
Failed to execute. Parameters are not valid.
ERROR 000732: Input Raster: Dataset D:\PWDs\SDE_Connection_Files\agren-gis-test-DataCreator.sde\GIS.DATACREATOR.all_dem does not exist or is not supported
Failed to execute (GetCellValue).

ERROR:root: File "D:\QAData\QAData.py", line 112, in QADEMData
result = arcpy.GetCellValue_management(in_raster=inAllDEMMosaicDatasetFullPath, location_point=str(point['x'])+ " " + str(point['y']), band_index="")
Failed to execute. Parameters are not valid.
ERROR 000732: Input Raster: Dataset D:\PWDs\SDE_Connection_Files\agren-gis-test-DataCreator.sde\GIS.DATACREATOR.all_dem does not exist or is not supported
Failed to execute (GetCellValue).
Failed to execute. Parameters are not valid.
ERROR 000732: Input Raster: Dataset D:\PWDs\SDE_Connection_Files\agren-gis-test-DataCreator.sde\GIS.DATACREATOR.all_dem does not exist or is not supported
Failed to execute (GetCellValue).

ERROR:root: File "D:\QAData\QAData.py", line 112, in QADEMData
result = arcpy.GetCellValue_management(in_raster=inAllDEMMosaicDatasetFullPath, location_point=str(point['x'])+ " " + str(point['y']), band_index="")
Failed to execute. Parameters are not valid.
ERROR 000732: Input Raster: Dataset D:\PWDs\SDE_Connection_Files\agren-gis-test-DataCreator.sde\GIS.DATACREATOR.all_dem does not exist or is not supported
Failed to execute (GetCellValue).
Failed to execute. Parameters are not valid.
ERROR 000732: Input Raster: Dataset D:\PWDs\SDE_Connection_Files\agren-gis-test-DataCreator.sde\GIS.DATACREATOR.all_dem does not exist or is not supported
Failed to execute (GetCellValue).

ERROR:root: File "D:\QAData\QAData.py", line 112, in QADEMData
result = arcpy.GetCellValue_management(in_raster=inAllDEMMosaicDatasetFullPath, location_point=str(point['x'])+ " " + str(point['y']), band_index="")
Failed to execute. Parameters are not valid.
ERROR 000732: Input Raster: Dataset D:\PWDs\SDE_Connection_Files\agren-gis-test-DataCreator.sde\GIS.DATACREATOR.all_dem does not exist or is not supported
Failed to execute (GetCellValue).
Failed to execute. Parameters are not valid.
ERROR 000732: Input Raster: Dataset D:\PWDs\SDE_Connection_Files\agren-gis-test-DataCreator.sde\GIS.DATACREATOR.all_dem does not exist or is not supported
Failed to execute (GetCellValue).

Outcomes