active_stations_XXXX already exists Failed to execute - PSU-CSAR/awdb-retrieve GitHub Wiki

After kicking off the weekly update from Task Manager, the script appeared to get "stuck" updating the first service. Stopped the script from Task Manager and tried to run it manually.

  • The script appeared to run successfully but the summary log had this warning message: 0 web services FAILED
  • Tried running the script manually from Python and got this error message: ERROR 000258: Output D:\projects\gisdata\awdb-retrieve\data\awdb-stations.gdb\active_stations_SNTL already exists Failed to execute (FeatureClassToFeatureClass).

Traceback (most recent call last): File "D:\projects\gisdata\awdb-retrieve\get_AWDB_stations_3.py", line 847, in main create_active_only_FC(source_path) File "D:\projects\gisdata\awdb-retrieve\get_AWDB_stations_3.py", line 555, in create_active_only_FC active_fc_name, " enddate = timestamp '2100-01-01 00:00:00'") File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\conversion.py", line 1771, in FeatureClassToFeatureClass raise e File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\conversion.py", line 1768, in FeatureClassToFeatureClass retval = convertArcObjectToPythonObject(gp.FeatureClassToFeatureClass_conversion(*gp_fixargs((in_features, out_path, out_name, where_clause, field_mapping, config_keyword), True))) File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 498, in <lambda> return lambda *args: val(*gp_fixargs(args, True)) arcgisscripting.ExecuteError: ERROR 000258: Output D:\projects\gisdata\awdb-retrieve\data\awdb-stations.gdb\active_stations_SNTL already exists Failed to execute (FeatureClassToFeatureClass).

Failed to make copies for inactive and active.

  • Tried to delete active_stations_SNTL using both ArcGIS Pro and ArcMap but could not
  • Tried to rename .gdb file through Windows but could not because file was locked
  • Tried to delete .lck file in .gdb through Windows but could not. Windows said that Python had locked the file
  • Downloaded procexp.exe (Process Explorer) from Microsoft to examine and locate the offending Python process. Determined process based on start time and killed it. This released the file lock and allowed the script to complete successfully
⚠️ **GitHub.com Fallback** ⚠️