You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now the exception comes from sys.__stderr__.fileno()
Maybe it would be better to stash the original value of stderr and use that in unconfigure rather than trying to get it by calling fileno()? Happy to supply a patch.
Traceback (most recent call last):
File "/home/venv3.9/lib/python3.9/site-packages/_pytest/faulthandler.py", line 47, in get_stderr_fileno
fileno = sys.stderr.fileno()
ValueError: I/O operation on closed file
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/venv3.9/bin/pytest", line 8, in<module>sys.exit(console_main())
File "/home/venv3.9/lib/python3.9/site-packages/_pytest/config/__init__.py", line 192, in console_main
code = main()
File "/home/venv3.9/lib/python3.9/site-packages/_pytest/config/__init__.py", line 169, in main
ret: Union[ExitCode, int] = config.hook.pytest_cmdline_main(
File "/home/venv3.9/lib/python3.9/site-packages/pluggy/_hooks.py", line 493, in __call__
return self._hookexec(self.name, self._hookimpls, kwargs, firstresult)
File "/home/venv3.9/lib/python3.9/site-packages/pluggy/_manager.py", line 115, in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
File "/home/venv3.9/lib/python3.9/site-packages/pluggy/_callers.py", line 113, in _multicall
raise exception.with_traceback(exception.__traceback__)
File "/home/venv3.9/lib/python3.9/site-packages/pluggy/_callers.py", line 77, in _multicall
res = hook_impl.function(*args)
File "/home/venv3.9/lib/python3.9/site-packages/_pytest/main.py", line 318, in pytest_cmdline_main
return wrap_session(config, _main)
File "/home/venv3.9/lib/python3.9/site-packages/_pytest/main.py", line 313, in wrap_session
config._ensure_unconfigure()
File "/home/venv3.9/lib/python3.9/site-packages/_pytest/config/__init__.py", line 1058, in _ensure_unconfigure
self.hook.pytest_unconfigure(config=self)
File "/home/venv3.9/lib/python3.9/site-packages/pluggy/_hooks.py", line 493, in __call__
return self._hookexec(self.name, self._hookimpls, kwargs, firstresult)
File "/home/venv3.9/lib/python3.9/site-packages/pluggy/_manager.py", line 115, in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
File "/home/venv3.9/lib/python3.9/site-packages/pluggy/_callers.py", line 113, in _multicall
raise exception.with_traceback(exception.__traceback__)
File "/home/venv3.9/lib/python3.9/site-packages/pluggy/_callers.py", line 77, in _multicall
res = hook_impl.function(*args)
File "/home/venv3.9/lib/python3.9/site-packages/_pytest/faulthandler.py", line 42, in pytest_unconfigure
faulthandler.enable(file=get_stderr_fileno())
File "/home/venv3.9/lib/python3.9/site-packages/_pytest/faulthandler.py", line 57, in get_stderr_fileno
returnsys.__stderr__.fileno()
ValueError: I/O operation on closed file
This is a follow-up to this issue #11439
Now the exception comes from
sys.__stderr__.fileno()
Maybe it would be better to stash the original value of stderr and use that in unconfigure rather than trying to get it by calling fileno()? Happy to supply a patch.
Environment
The text was updated successfully, but these errors were encountered: