AnsweredAssumed Answered

Cannot delete FileGeodatabase after Network dataset is created and built

Question asked by vholubecarcdata-cz-esridist Employee on Mar 26, 2020
Latest reply on Mar 26, 2020 by Dan_Patterson

Dear all,

 

can anyone help me with issue - how to delete the FGDB, in which netwarok dataset was created and built? 

In my script I create a temp FGDB with arcpy.CreateFileGDB_management, then

  • import GTFS data, then
  • create Network dataset,
  • which is then built by  (in this order).

 

This temp FGDB is then copied to another FGDB. The problem is, when I want to delete this temp geodatabase.

 

I am not able to delete it with arcpy.Delete_management, even if before it I used compact tool.

 

I also tried shutil.rmtree("path_to_TempFGDB"), but this throws me an error - 

 

[WinError 32] The process cannot access the file because it is being used by another process: '<Path to temp FGDB>\\MMB_NW.gdb\\a00000009.FDO_ID.atx'  - still the same file.

 

Do you have any idea, why this file is still being locked? Is there any way, how to remove this lock? There is no PRO or another tool which would use the FGDB, just the Python.

 

Thank you for any idea.

 

Vladimir

Outcomes