Closed
Bug 1585744
Opened 5 years ago
Closed 5 years ago
rst: ModuleNotFoundError: No module named 'rstcheck' / IndexError: list index out of range
Categories
(Developer Infrastructure :: Lint and Formatting, defect)
Developer Infrastructure
Lint and Formatting
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1585734
People
(Reporter: Mardak, Unassigned)
References
(Regression)
Details
(Keywords: regression)
$ rm -rf obj && ./mach lint -l rst browser/components/newtab
Using base prefix '/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7'
/mozilla-central/third_party/python/virtualenv/virtualenv.py:1047: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import imp
New python executable in /mozilla-central/obj/_virtualenvs/init_py3/bin/python3.7
Also creating executable in /mozilla-central/obj/_virtualenvs/init_py3/bin/python
Installing setuptools, pip, wheel...done.
b'running build_ext\ncopying build/lib.macosx-10.14-x86_64-3.7/psutil/_psutil_osx.cpython-37m-darwin.so -> psutil\ncopying build/lib.macosx-10.14-x86_64-3.7/psutil/_psutil_posix.cpython-37m-darwin.so -> psutil\n'
Error processing command. Ignoring because optional. (optional:packages.txt:comm/build/virtualenv_packages.txt)
Traceback (most recent call last):
File "/mozilla-central/python/mozlint/mozlint/roller.py", line 55, in _run_worker
res = func(paths, config, **lintargs) or []
File "/mozilla-central/python/mozlint/mozlint/types.py", line 54, in __call__
return self._lint(paths, config, **lintargs)
File "/mozilla-central/python/mozlint/mozlint/types.py", line 139, in _lint
return func(files, config, **lintargs)
File "/mozilla-central/tools/lint/rst/__init__.py", line 92, in lint
filename, lineno, level, message = parse_with_split(errors)
File "/mozilla-central/tools/lint/rst/__init__.py", line 61, in parse_with_split
idx = filtered_output[2].index(") ")
IndexError: list index out of range
A failure occurred in the rst linter.
✖ 1 problem (0 errors, 0 warnings, 1 failure)
If I modify rst/__init__.py
to print out the actual error that it's trying to parse/split:
Traceback (most recent call last):
File "/mozilla-central/obj/_virtualenvs/init_py3/bin/rstcheck", line 7, in <module>
from rstcheck import main
ModuleNotFoundError: No module named 'rstcheck'
And checking for rstcheck in _virtualenvs
finds rstcheck.py and rstcheck-3.3.1-dist-info:
$ find obj/_virtualenvs/init_py3/lib/python3.7/site-packages/rstcheck*
obj/_virtualenvs/init_py3/lib/python3.7/site-packages/rstcheck-3.3.1.dist-info
obj/_virtualenvs/init_py3/lib/python3.7/site-packages/rstcheck-3.3.1.dist-info/RECORD
obj/_virtualenvs/init_py3/lib/python3.7/site-packages/rstcheck-3.3.1.dist-info/LICENSE
obj/_virtualenvs/init_py3/lib/python3.7/site-packages/rstcheck-3.3.1.dist-info/WHEEL
obj/_virtualenvs/init_py3/lib/python3.7/site-packages/rstcheck-3.3.1.dist-info/entry_points.txt
obj/_virtualenvs/init_py3/lib/python3.7/site-packages/rstcheck-3.3.1.dist-info/AUTHORS.rst
obj/_virtualenvs/init_py3/lib/python3.7/site-packages/rstcheck-3.3.1.dist-info/top_level.txt
obj/_virtualenvs/init_py3/lib/python3.7/site-packages/rstcheck-3.3.1.dist-info/INSTALLER
obj/_virtualenvs/init_py3/lib/python3.7/site-packages/rstcheck-3.3.1.dist-info/METADATA
obj/_virtualenvs/init_py3/lib/python3.7/site-packages/rstcheck.py
Reporter | ||
Comment 1•5 years ago
|
||
This seems likely to be dupe of bug 1585734 in that both are just failing to find the module (here rstcheck and there codespell_lib) that should be there.
See Also: → 1585734
Comment 2•5 years ago
|
||
I am unable to reproduce it locally, it seems to working fine for me locally. Did rstcheck install locally in your environment?
Flags: needinfo?(edilee)
Reporter | ||
Comment 3•5 years ago
|
||
After manually installing pip3 install rstcheck
, the error goes away. So I guess something isn't quite right with the virtualenv not using the one installed by mach.
Flags: needinfo?(edilee)
Comment 4•5 years ago
|
||
Type: task → defect
Comment 5•5 years ago
|
||
Yeah, these definitely look like dupes. Somethings going wrong with the virtualenv activation or something.
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
Updated•2 years ago
|
Has Regression Range: --- → yes
Updated•2 years ago
|
Keywords: regression
Updated•2 years ago
|
Product: Firefox Build System → Developer Infrastructure
You need to log in
before you can comment on or make changes to this bug.
Description
•