camelot icon indicating copy to clipboard operation
camelot copied to clipboard

ResourceWarning: unclosed file [utils.py:131

Open CyrusDsouza opened this issue 5 years ago • 2 comments
trafficstars

Hi,

While extracting tables from pdfs we noticed that we get an unclosed file error from the 131st line

from the dev code, we can see that line 73 and 123 in handlers.py has an open() which may not be closed

this is just what I am speculating. But any ideas on how the resource warning can be eliminated as I feel this is also causing a memory leak

CyrusDsouza avatar Jul 23 '20 20:07 CyrusDsouza

Hi @CyrusDsouza, thanks for opening the issue. I'll look into it as soon as possible.

vinayak-mehta avatar Jul 23 '20 21:07 vinayak-mehta

Fixed by 13a50e2 (although I'd prefer with blocks rather than explicit close).

Arnie97 avatar Dec 17 '20 16:12 Arnie97