[New-bugs-announce] [issue32866] zipimport loader.get_data() requires absolute zip file path

Barry A. Warsaw report at bugs.python.org
Sat Feb 17 21:49:21 EST 2018


New submission from Barry A. Warsaw <barry at python.org>:

Over in https://gitlab.com/python-devs/importlib_resources/issues/48 we have a report of a FileNotFoundError when trying to read a resource from a zip file.  Upon further debugging, I found that zipimport's loader.get_data() raises an unexpected OSError.  Interestingly, if the path to the zip file is absolute, everything works as expected, but if the path is relative, then it fails.

There's probably a missing abspath() in there somewhere, but as zipimport is written in C, I really didn't spend much time digging around in gdb.

----------
messages: 312296
nosy: barry
priority: normal
severity: normal
status: open
title: zipimport loader.get_data() requires absolute zip file path
versions: Python 3.6, Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32866>
_______________________________________


More information about the New-bugs-announce mailing list