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. |