diff --git a/apps/ocr/api.py b/apps/ocr/api.py index d0e4668c51..bc9f775f76 100644 --- a/apps/ocr/api.py +++ b/apps/ocr/api.py @@ -111,6 +111,7 @@ def do_document_ocr(document): f.close() cleanup(ocr_output) finally: + os.close(desc) cleanup(filepath) if imagefile: cleanup(imagefile)