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
This is the first time in over 10 years of python programming that I've run into an actual issue with file handles left open, so I felt that the use of two exclamation points in the subject was warranted. I'm removing a temporary template after an unrelated error, and...
File "D:\anaconda32\lib\shutil.py", line 250, in rmtree
os.remove(fullname)
WindowsError: [Error 32] The process cannot access the file because it is being
used by another process: '.\\tmpp2duu1\\cookiecutter.json'
This change in generate.py:90 helps python not stumble on this particular issue:
try:
with open(context_file) as file_handle:
obj = json.load(file_handle, object_pairs_hook=OrderedDict)
except ValueError as e:
# ...
The text was updated successfully, but these errors were encountered:
In https://github.com/audreyr/cookiecutter/blob/master/cookiecutter/generate.py#L90,
file_handle.close()
is never called, and there's no need for it to remain open.This is the first time in over 10 years of python programming that I've run into an actual issue with file handles left open, so I felt that the use of two exclamation points in the subject was warranted. I'm removing a temporary template after an unrelated error, and...
This change in generate.py:90 helps python not stumble on this particular issue:
The text was updated successfully, but these errors were encountered: