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

Version 7.2.0 AttributeError: module 'py' has no attribute 'io' #10422

Closed
cdkini opened this issue Oct 25, 2022 · 2 comments
Closed

Version 7.2.0 AttributeError: module 'py' has no attribute 'io' #10422

cdkini opened this issue Oct 25, 2022 · 2 comments

Comments

@cdkini
Copy link

cdkini commented Oct 25, 2022

Hey there! Since upgrading to the latest release 7.2.0, I've been seeing the following stack trace when running pytest in Azure CI:

INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/usr/local/lib/python3.7/site-packages/_pytest/main.py", line 266, in wrap_session
INTERNALERROR>     config._do_configure()
INTERNALERROR>   File "/usr/local/lib/python3.7/site-packages/_pytest/config/__init__.py", line 1037, in _do_configure
INTERNALERROR>     self.hook.pytest_configure.call_historic(kwargs=dict(config=self))
INTERNALERROR>   File "/usr/local/lib/python3.7/site-packages/pluggy/_hooks.py", line 277, in call_historic
INTERNALERROR>     res = self._hookexec(self.name, self.get_hookimpls(), kwargs, False)
INTERNALERROR>   File "/usr/local/lib/python3.7/site-packages/pluggy/_manager.py", line 80, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR>   File "/usr/local/lib/python3.7/site-packages/pluggy/_callers.py", line 60, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "/usr/local/lib/python3.7/site-packages/pluggy/_result.py", line 60, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "/usr/local/lib/python3.7/site-packages/pluggy/_callers.py", line 39, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/usr/local/lib/python3.7/site-packages/pytest_benchmark/plugin.py", line 440, in pytest_configure
INTERNALERROR>     bs = config._benchmarksession = BenchmarkSession(config)
INTERNALERROR>   File "/usr/local/lib/python3.7/site-packages/pytest_benchmark/session.py", line 38, in __init__
INTERNALERROR>     self.logger = Logger(level, config=config)
INTERNALERROR>   File "/usr/local/lib/python3.7/site-packages/pytest_benchmark/logger.py", line 20, in __init__
INTERNALERROR>     self.term = py.io.TerminalWriter(file=sys.stderr)
INTERNALERROR> AttributeError: module 'py' has no attribute 'io'

Our Azure pipelines use the latest version of pytest and this issue was not present before this release.

  • Python Versions: 3.7 - 3.9
  • OS: Ubuntu 20.04

Here are some Azure logs if they'd be helpful: https://dev.azure.com/great-expectations/great_expectations/_build/results?buildId=113833&view=results

Please let me know if I can provide any additional information. Thanks for all the hard work here - pytest is invaluable to our team's efforts 🙇🏽

@asottile
Copy link
Member

follow along at ionelmc/pytest-benchmark#226

@The-Compiler
Copy link
Member

Also see my comment in #10420 for some more context.

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

No branches or pull requests

3 participants