Skip to content Skip to sidebar Skip to footer

Unable To Delete File - File Being Used By Another Process

I currently use the Pillow (and windows) lib to convert 2 types of files to jpeg. The problem is I create a tmp file to alter (crop/re-size/rotate/etc) but afterwords I cannot dele

Solution 1:

It may be related to this line:

im = tmp = PIL.Image.open(outputfile)

which does not actually open two copies of the image. Instead, you might want something like:

im = PIL.Image.open(outputfile)
tmp = im.copy()

Post a Comment for "Unable To Delete File - File Being Used By Another Process"