Skip to content

ImportError on collection of module in pylint 2.5.0 when using multiprocessing option #3524

Closed
@robsan00

Description

@robsan00

Steps to reproduce

  1. create a new & empty virtualenv only containing pyling 2.5.0 (using Python 3.6)
  2. create a folder "test" somewhere
  3. add an (empty) "__init__.py" file there
  4. add an (empty "spam.py" file there
  5. go to the parent directory of "test" and call "pylint -j 1 test" -> no error
  6. go to the parent directory of "test" and call "pylint -j 2 test" ->
Traceback (most recent call last):
  File "c:\Python36\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\Python36\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\work\venv\pylint\Scripts\pylint.exe\__main__.py", line 7, in <module>
  File "c:\work\venv\pylint\lib\site-packages\pylint\__init__.py", line 22, in run_pylint
    PylintRun(sys.argv[1:])
  File "c:\work\venv\pylint\lib\site-packages\pylint\lint\run.py", line 338, in __init__
    linter.check(args)
  File "c:\work\venv\pylint\lib\site-packages\pylint\lint\pylinter.py", line 878, in check
    files_or_modules,
  File "c:\work\venv\pylint\lib\site-packages\pylint\lint\check_parallel.py", line 101, in check_parallel
    _worker_check_single_file, files
  File "c:\Python36\lib\multiprocessing\pool.py", line 735, in next
    raise value
ImportError: Unable to find module for test\spam.py in C:\work\venv\pylint\Scripts\pylint.exe,
c:\work\venv\pylint\scripts\python36.zip,
c:\Python36\DLLs,
c:\Python36\lib,
c:\Python36,
c:\work\venv\pylint,
c:\work\venv\pylint\lib\site-packages,
c:\work\venv\pylint\lib\site-packages\astroid\brain

Current behavior

ImportError

Expected behavior

no error (for example with pylint 2.4.4)

pylint --version output

pylint 2.5.0
astroid 2.4.0
Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:54:40) [MSC v.1900 64 bit (AMD64)]

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions