Brett Cannon added the comment:

So there are 2 problems with your example. One, importlib.util.find_spec() 
doesn't take a path argument but a package argument which is a package name and 
not a file system location 
(https://docs.python.org/3/library/importlib.html#importlib.util.find_spec). 
Two, importlib.find_loader() takes a "path" as in "a package's path" which 
means __path__. What this means it is it expected to be an iterable of 
directories and not a string as it's iterated over 
(https://docs.python.org/3/library/importlib.html#importlib.find_loader).

If you think the docs aren't clear enough then please feel free to submit a 
patch to make them a bit clearer.

----------
resolution:  -> not a bug
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27059>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to