I have a custom geoprocessing tool built by ModelBuilder. The tool copies some feature classes to scratch.gdb and then join with other tables, finally export to some other feature classes.
The tool has been run fine last few year. But exception occurred last week,
INFO - 2026-09-25 04:06:08,930 - Traceback (most recent call last):
File "D:\daily_sync\python\tasks\task.py", line 39, in run
retCode = self.method()
File "D:\daily_sync\python\tasks\full.py", line 448, in <lambda>
connectionFile+"/"+schema+"."+"BLDG_STRUCT_10_CLUSTER")).addPreTask(task.Task("Import toolbox", lambda: arcpy.ImportToolbox(toolboxPath))),
File "C:\Program Files\ArcGIS\Server\ArcPy\arcpy\geoprocessing_base.py", line 510, in <lambda>
return lambda *args: val(*gp_fixargs(args, True))
ExecuteError: ERROR 000229: Cannot open C:\Users\aaaaa\AppData\Local\Temp\scratch.gdb\ASSIGNMENT_AREA
Failed to execute (Spatial Join).
Failed to execute (Model8).
I found that there are shapefiles in scratch.gdb.
The problem repeated even I re-created scratch.gdb. How can I resolve the problem?