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

Regression in pytest 4.4: INTERNALERROR with `-p no:terminal --collect-only` and crash #5505

Closed
asottile opened this issue Jun 27, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@asottile
Copy link
Member

commented Jun 27, 2019

raise TypeError('oops!')

def test(): pass
$ pytest --version
This is pytest version 4.3.1, imported from /tmp/x/venv/lib/python3.6/site-packages/pytest.py
$ pytest -p no:terminal --collect-only t.py
$ echo $?
2
$ pytest --version
This is pytest version 4.6.3, imported from /tmp/x/venv/lib/python3.6/site-packages/pytest.py
$ pytest -p no:terminal --collect-only t.py
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/tmp/x/venv/lib/python3.6/site-packages/_pytest/config/__init__.py", line 1002, in getoption
INTERNALERROR>     val = getattr(self.option, name)
INTERNALERROR> AttributeError: 'Namespace' object has no attribute 'tbstyle'
INTERNALERROR> 
INTERNALERROR> During handling of the above exception, another exception occurred:
INTERNALERROR> 
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/tmp/x/venv/lib/python3.6/site-packages/_pytest/main.py", line 206, in wrap_session
INTERNALERROR>     session.exitstatus = doit(config, session) or 0
INTERNALERROR>   File "/tmp/x/venv/lib/python3.6/site-packages/_pytest/main.py", line 249, in _main
INTERNALERROR>     config.hook.pytest_collection(session=session)
INTERNALERROR>   File "/tmp/x/venv/lib/python3.6/site-packages/pluggy/hooks.py", line 289, in __call__
INTERNALERROR>     return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR>   File "/tmp/x/venv/lib/python3.6/site-packages/pluggy/manager.py", line 87, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR>   File "/tmp/x/venv/lib/python3.6/site-packages/pluggy/manager.py", line 81, in <lambda>
INTERNALERROR>     firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
INTERNALERROR>   File "/tmp/x/venv/lib/python3.6/site-packages/pluggy/callers.py", line 208, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "/tmp/x/venv/lib/python3.6/site-packages/pluggy/callers.py", line 80, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "/tmp/x/venv/lib/python3.6/site-packages/pluggy/callers.py", line 187, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/tmp/x/venv/lib/python3.6/site-packages/_pytest/main.py", line 259, in pytest_collection
INTERNALERROR>     return session.perform_collect()
INTERNALERROR>   File "/tmp/x/venv/lib/python3.6/site-packages/_pytest/main.py", line 495, in perform_collect
INTERNALERROR>     items = self._perform_collect(args, genitems)
INTERNALERROR>   File "/tmp/x/venv/lib/python3.6/site-packages/_pytest/main.py", line 534, in _perform_collect
INTERNALERROR>     self.items.extend(self.genitems(node))
INTERNALERROR>   File "/tmp/x/venv/lib/python3.6/site-packages/_pytest/main.py", line 769, in genitems
INTERNALERROR>     rep = collect_one_node(node)
INTERNALERROR>   File "/tmp/x/venv/lib/python3.6/site-packages/_pytest/runner.py", line 371, in collect_one_node
INTERNALERROR>     rep = ihook.pytest_make_collect_report(collector=collector)
INTERNALERROR>   File "/tmp/x/venv/lib/python3.6/site-packages/pluggy/hooks.py", line 289, in __call__
INTERNALERROR>     return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR>   File "/tmp/x/venv/lib/python3.6/site-packages/pluggy/manager.py", line 87, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR>   File "/tmp/x/venv/lib/python3.6/site-packages/pluggy/manager.py", line 81, in <lambda>
INTERNALERROR>     firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
INTERNALERROR>   File "/tmp/x/venv/lib/python3.6/site-packages/pluggy/callers.py", line 203, in _multicall
INTERNALERROR>     gen.send(outcome)
INTERNALERROR>   File "/tmp/x/venv/lib/python3.6/site-packages/_pytest/capture.py", line 213, in pytest_make_collect_report
INTERNALERROR>     rep = outcome.get_result()
INTERNALERROR>   File "/tmp/x/venv/lib/python3.6/site-packages/pluggy/callers.py", line 80, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "/tmp/x/venv/lib/python3.6/site-packages/pluggy/callers.py", line 187, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/tmp/x/venv/lib/python3.6/site-packages/_pytest/runner.py", line 267, in pytest_make_collect_report
INTERNALERROR>     errorinfo = collector.repr_failure(call.excinfo)
INTERNALERROR>   File "/tmp/x/venv/lib/python3.6/site-packages/_pytest/nodes.py", line 332, in repr_failure
INTERNALERROR>     tbstyle = self.config.getoption("tbstyle")
INTERNALERROR>   File "/tmp/x/venv/lib/python3.6/site-packages/_pytest/config/__init__.py", line 1013, in getoption
INTERNALERROR>     raise ValueError("no option named %r" % (name,))
INTERNALERROR> ValueError: no option named 'tbstyle'

workaround

the last known good version is 4.3.1

@asottile asottile added the type: bug label Jun 27, 2019

@nicoddemus

This comment has been minimized.

Copy link
Member

commented Jun 27, 2019

Is this a release blocker? If so please assign the 5.0 milestone to it. 👍

@asottile

This comment has been minimized.

Copy link
Member Author

commented Jun 27, 2019

I'd like to get it into the release, almost ready :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.