Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

INTERNALERROR with pytest-xdist #102

Closed
MartinThoma opened this issue Aug 23, 2020 · 1 comment
Closed

INTERNALERROR with pytest-xdist #102

MartinThoma opened this issue Aug 23, 2020 · 1 comment

Comments

@MartinThoma
Copy link

I had the following installed:

$ time pytest -n 4              
/home/moose/.pyenv/versions/3.8.4/lib/python3.8/site-packages/pytest_benchmark/logger.py:44: PytestBenchmarkWarning: Benchmarks are automatically disabled because xdist plugin is active.Benchmarks cannot be performed reliably in a parallelized environment.
  warner(PytestBenchmarkWarning(text))
Test session starts (platform: linux, Python 3.8.4, pytest 6.0.1, pytest-sugar 0.9.4)
benchmark: 3.2.3 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
rootdir: /home/moose/GitHub/MartinThoma/mpu, configfile: setup.cfg
plugins: cov-2.10.1, timeout-1.4.2, requests-mock-1.8.0, benchmark-3.2.3, mccabe-1.0, sugar-0.9.4, mypy-0.6.2, black-0.3.10, hypothesis-5.23.8, leaks-0.3.1, forked-1.3.0, xdist-2.0.0
timeout: 30.0s
timeout method: signal
timeout func_only: False
gw0 C / gw1 I / gw2 I / gw3 IINTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/home/moose/.pyenv/versions/3.8.4/lib/python3.8/site-packages/_pytest/main.py", line 238, in wrap_session
INTERNALERROR>     config.hook.pytest_sessionstart(session=session)
INTERNALERROR>   File "/home/moose/.pyenv/versions/3.8.4/lib/python3.8/site-packages/pluggy/hooks.py", line 286, in __call__
INTERNALERROR>     return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR>   File "/home/moose/.pyenv/versions/3.8.4/lib/python3.8/site-packages/pluggy/manager.py", line 93, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR>   File "/home/moose/.pyenv/versions/3.8.4/lib/python3.8/site-packages/pluggy/manager.py", line 84, in <lambda>
INTERNALERROR>     self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
INTERNALERROR>   File "/home/moose/.pyenv/versions/3.8.4/lib/python3.8/site-packages/pluggy/callers.py", line 208, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "/home/moose/.pyenv/versions/3.8.4/lib/python3.8/site-packages/pluggy/callers.py", line 80, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "/home/moose/.pyenv/versions/3.8.4/lib/python3.8/site-packages/pluggy/callers.py", line 187, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/home/moose/.pyenv/versions/3.8.4/lib/python3.8/site-packages/xdist/dsession.py", line 78, in pytest_sessionstart
INTERNALERROR>     nodes = self.nodemanager.setup_nodes(putevent=self.queue.put)
INTERNALERROR>   File "/home/moose/.pyenv/versions/3.8.4/lib/python3.8/site-packages/xdist/workermanage.py", line 65, in setup_nodes
INTERNALERROR>     return [self.setup_node(spec, putevent) for spec in self.specs]
INTERNALERROR>   File "/home/moose/.pyenv/versions/3.8.4/lib/python3.8/site-packages/xdist/workermanage.py", line 65, in <listcomp>
INTERNALERROR>     return [self.setup_node(spec, putevent) for spec in self.specs]
INTERNALERROR>   File "/home/moose/.pyenv/versions/3.8.4/lib/python3.8/site-packages/xdist/workermanage.py", line 73, in setup_node
INTERNALERROR>     node.setup()
INTERNALERROR>   File "/home/moose/.pyenv/versions/3.8.4/lib/python3.8/site-packages/xdist/workermanage.py", line 260, in setup
INTERNALERROR>     self.config.hook.pytest_configure_node(node=self)
INTERNALERROR>   File "/home/moose/.pyenv/versions/3.8.4/lib/python3.8/site-packages/pluggy/hooks.py", line 286, in __call__
INTERNALERROR>     return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR>   File "/home/moose/.pyenv/versions/3.8.4/lib/python3.8/site-packages/pluggy/manager.py", line 93, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR>   File "/home/moose/.pyenv/versions/3.8.4/lib/python3.8/site-packages/pluggy/manager.py", line 84, in <lambda>
INTERNALERROR>     self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
INTERNALERROR>   File "/home/moose/.pyenv/versions/3.8.4/lib/python3.8/site-packages/pluggy/callers.py", line 208, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "/home/moose/.pyenv/versions/3.8.4/lib/python3.8/site-packages/pluggy/callers.py", line 80, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "/home/moose/.pyenv/versions/3.8.4/lib/python3.8/site-packages/pluggy/callers.py", line 187, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/home/moose/.pyenv/versions/3.8.4/lib/python3.8/site-packages/pytest_mypy.py", line 58, in pytest_configure_node
INTERNALERROR>     node.slaveinput['_mypy_results_path'] = \
INTERNALERROR> AttributeError: 'WorkerController' object has no attribute 'slaveinput'

with the following packages:

pytest==6.0.1
pytest-cov==2.10.1
pytest-mccabe==1.0
pytest-xdist==2.0.0
pytest-mypy==0.6.2

After uninstalling pytest-cov it worked.

I think this is related to pytest-dev/pytest-xdist#577 and pytest-dev/pytest-cov#422

@dmtucker
Copy link
Collaborator

Thanks for the report!
This is indeed caused by incompatible changes in pytest-xdist 2; however it should already be fixed by #101 😊
I will try to get a release out today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants