Skip to content

Pylint fails to run, exits with a PicklingError #4145

Closed
@Nadock

Description

@Nadock

Whenever I run pylint on my project since the update to 2.7.1, pylint crashes shortly after starting with a PicklingError (see below). This also effects 2.7.0 but not 2.6.2.

Steps to reproduce

Run pylint in my project via:

$> pylint src/

The closest I've gotten to a source line for the error is a 3rd party import we are using:

from redbot.core import utils

Current behavior

Traceback (most recent call last):
  File "/Users/$HOME/.local/share/virtualenvs/$PROJECT/bin/pylint", line 8, in <module>
    sys.exit(run_pylint())
  File "/Users/$HOME/.local/share/virtualenvs/$PROJECT/lib/python3.8/site-packages/pylint/__init__.py", line 22, in run_pylint
    PylintRun(sys.argv[1:])
  File "/Users/$HOME/.local/share/virtualenvs/$PROJECT/lib/python3.8/site-packages/pylint/lint/run.py", line 358, in __init__
    linter.check(args)
  File "/Users/$HOME/.local/share/virtualenvs/$PROJECT/lib/python3.8/site-packages/pylint/lint/pylinter.py", line 866, in check
    check_parallel(
  File "/Users/$HOME/.local/share/virtualenvs/$PROJECT/lib/python3.8/site-packages/pylint/lint/parallel.py", line 138, in check_parallel
    for (
  File "/Users/$HOME/.pyenv/versions/3.8.3/lib/python3.8/multiprocessing/pool.py", line 868, in next
    raise value
multiprocessing.pool.MaybeEncodingError: Error sending result: '<multiprocessing.pool.ExceptionWithTraceback object at 0x107ee19d0>'. Reason: 'PicklingError("Can't pickle <enum 'Context'>: attribute lookup Context on astroid failed")'

Expected behavior

pylint should run without error.

pylint --version output

Result of pylint --version output:

$> pylint --version
pylint 2.7.1
astroid 2.5
Python 3.8.3 (default, Aug  5 2020, 20:24:44)
[Clang 11.0.3 (clang-1103.0.32.62)]

Further system details

Intel MacBook Pro
MacOS BigSur 11.2.1 (20D74)

$> pip freeze
aiohttp==3.6.2
aiohttp-json-rpc==0.13.2
aiosqlite==0.15.0
appdirs==1.4.4
apsw-wheels==3.30.1.post3
argcomplete==1.12.2
astroid==2.5
async-timeout==3.0.1
attrs==19.3.0
Babel==2.8.0
black==20.8b1
chardet==3.0.4
click==7.1.2
colorama==0.4.3
commonmark==0.9.1
contextlib2==0.6.0.post1
dateparser==1.0.0
discord.py==1.5.1
fuzzywuzzy==0.18.0
idna==2.10
iniconfig==1.1.1
isort==5.7.0
lazy-object-proxy==1.5.2
Markdown==3.2.2
mccabe==0.6.1
multidict==4.7.6
mypy==0.812
mypy-extensions==0.4.3
packaging==20.9
pathspec==0.8.1
pluggy==0.13.1
py==1.10.0
Pygments==2.6.1
pylint==2.7.1
pyparsing==2.4.7
pytest==6.2.2
python-dateutil==2.8.1
python-Levenshtein-wheels==0.13.1
pytz==2020.1
PyYAML==5.3.1
Red-DiscordBot==3.4.5
Red-Lavalink==0.7.1
regex==2020.11.13
rich==9.5.1
rope==0.18.0
schema==0.7.2
six==1.15.0
toml==0.10.2
tqdm==4.48.0
typed-ast==1.4.2
typing-extensions==3.7.4.2
tzlocal==2.1
uvloop==0.14.0
wrapt==1.12.1
yarl==1.5.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Blocker 🙅Blocks the next releaseCrash 💥A bug that makes pylint crash

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions