Not sure if this is the right board to post this, if not, please advise...
I have a notebook on ArcGIS Online that I have scheduled to run daily. 90% of the time it works, but sometimes it errors out with the error in the title:
Just curious what causes this and any tips to avoid it.
Edit - Narrowed this down to a delete function listed below. But again, most of the time this works. Only rarely does it throw the above error:
def delete():
for f in os.listdir(directory):
if ".snapshot" not in f and ".tasks" not in f:
if os.path.isfile(os.path.join(directory, f)):
os.remove(os.path.join(directory, f))
elif os.path.isdir(os.path.join(directory, f)):
shutil.rmtree(os.path.join(directory, f))
# Delete Temporary items
for i in folder.list():
if i.title == "temp" and i.type == "CSV":
i.delete()
--
Roger Asbury
Analyst/Programmer - Fairbanks North Star Borough