I am currently working with a geodatabase. I have the main script and multiple functions that the script calls.
However, some functions can call the same additional functions inside them.
The issue is that I have an error that my main script can not finish the process.
However, each function works perfectly. Moreover, I have an issue with the last two functions in my script, so the first function from them (two last functions) will work the second won't. If I change them the first one will work no matter which one. Additionally, I can finish the process if I call the failed function but put it as the first.
I have several loops, several layers and lists.
- I deleted the cursor after each loop and layers at the end of each operation ( del and arcpy.Delete_management).
- I deleted each list at the end of each operation (del list)
- I gave different names for the same layers or list when I called them inside of the different functions.
- I updated my initial folder every time to be sure that the previous process would impact.
- I restarted my computer.
Now I think that the same function could impact the process. Moreover, when I use the debugger I can see Python misses the lines in a loop that leads to the issue. It happens when I call the same function that I called in the previous function.
Could you please recommend me anything?