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
If you run the following script with a file as the first argument, OLEfile throws a warning exception as pyhwp is not opening a file within a with context manager.
File opened
/usr/local/lib/python3.8/dist-packages/olefile-0.47.dev4-py3.8.egg/olefile/olefile.py:1410: OleFileIONotClosed: Deleting OleFileIO instance with open file handle. You should ensure that OleFileIO is never deleted without calling close() first. Consider using "with OleFileIO(...) as ole: ...".
Stacktrace of open() call:
File "test.py", line 5, in <module>
hwp5file = hwp5.xmlmodel.Hwp5File(sys.argv[1])
File "/home/yog/.local/lib/python3.8/site-packages/hwp5/filestructure.py", line 537, in __init__
stg = Hwp5FileBase(stg)
File "/home/yog/.local/lib/python3.8/site-packages/hwp5/filestructure.py", line 188, in __init__
stg = OleStorage(stg)
File "/home/yog/.local/lib/python3.8/site-packages/hwp5/storage/ole.py", line 35, in __init__
self.impl = impl_class(*args, **kwargs)
File "/home/yog/.local/lib/python3.8/site-packages/hwp5/plat/olefileio.py", line 115, in __init__
olefile = OleFileIO(olefile)
File "/usr/local/lib/python3.8/dist-packages/olefile-0.47.dev4-py3.8.egg/olefile/olefile.py", line 1107, in __init__
self.open(filename, write_mode=write_mode)
File "/usr/local/lib/python3.8/dist-packages/olefile-0.47.dev4-py3.8.egg/olefile/olefile.py", line 1213, in open
self._open_stack = traceback.extract_stack() # remember for warning
If you run the following script with a file as the first argument, OLEfile throws a warning exception as pyhwp is not opening a file within a
with
context manager.Reproduce
My version history is
python3 -m pip install olefile --upgrade
Requirement already up-to-date: olefile in /usr/local/lib/python3.8/dist-packages/olefile-0.47.dev4-py3.8.egg (0.47.dev4)
python3 -m pip install pyhwp --upgrade
The text was updated successfully, but these errors were encountered: