RuntimeError: 'path' must be None or a list, not <class '_frozen_importlib_external._NamespacePath'>
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pylint (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
A simple "import ruamel.yaml" causes pylint3 to show a stack trace when run inside a schroot session from sbuild:
echo "import ruamel.yaml" > test.py
pylint3 --reports=no test.py
No config file found, using default configuration
************* Module test
C: 1, 0: Missing module docstring (missing-docstring)
Traceback (most recent call last):
File "/usr/lib/
value = self._mod_
KeyError: ('ruamel.yaml', None)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/pylint3", line 3, in <module>
run_pylint()
File "/usr/lib/
Run(
File "/usr/lib/
linter.
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
walker.
File "/usr/lib/
self.
File "/usr/lib/
cb(astroid)
File "/usr/lib/
self.
File "/usr/lib/
module = next(module.
File "/usr/lib/
nodes = [n for n in func(*args, **kwargs) if not isinstance(n, cls)]
File "/usr/lib/
return [self.import_
File "/usr/lib/
return MANAGER.
File "/usr/lib/
filepath, mp_type = self.file_
File "/usr/lib/
modname.
File "/usr/lib/
return _file_from_
File "/usr/lib/
mtype, mp_filename = _module_
File "/usr/lib/
stream, mp_filename, mp_desc = imp.find_
File "/usr/lib/
"not {}".format(
RuntimeError: 'path' must be None or a list, not <class '_frozen_
debian/rules:7: recipe for target 'override_
You can reproduce this bug by creating a small Debian package, add pylint3 and python3-ruamel.yaml to its build dependencies and add this debian/rules snippet:
override_
echo "import ruamel.yaml" > test.py
pylint3 --reports=no test.py
Package versions:
* pylint3 1.5.6-1
* python3-astroid 1.4.8-1
* python3.5 3.5.2-9
Full list of packages is attached.
Changed in pylint (Ubuntu): | |
status: | New → Confirmed |
Also note that pylint3 works fine on Debian testing and Ubuntu 16.10 (yakkety).