You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since directory existence check and create are not one atomic operation, it's possible directory gets created (by another thread or process running the same code) between the check and the create. When that happens, the other thread/process fails with FileExistsError.
The solution here is to set exist_ok=True when calling os.makedirs. I.e. the create op should be idempotent here.
The text was updated successfully, but these errors were encountered:
For all directory lookup operations when
create=True
, this gets executed in_get_folder()
:homebase/homebase/homebase.py
Lines 429 to 430 in 482e917
Since directory existence check and create are not one atomic operation, it's possible directory gets created (by another thread or process running the same code) between the check and the create. When that happens, the other thread/process fails with
FileExistsError
.The solution here is to set
exist_ok=True
when callingos.makedirs
. I.e. the create op should be idempotent here.The text was updated successfully, but these errors were encountered: