pytest failed to run on windows: OSError: [WinError 87]
See original GitHub issueI’m using a clean virtual env on windows 7 with python 3.7.4, the pytest is always failed with a OSError as below, on the same machine, i have succeeded to run the pytest on same code with a previou python version, is this related to an upgrade with python?
(calculator) D:\workspace\CalculatorLibrary>pytest -h
Traceback (most recent call last):
File "d:\python37\Lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "d:\python37\Lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "D:\workspace\calculator\Scripts\pytest.exe\__main__.py", line 9, in <module>
File "d:\workspace\calculator\lib\site-packages\_pytest\config\__init__.py", line 55, in main
config = _prepareconfig(args, plugins)
File "d:\workspace\calculator\lib\site-packages\_pytest\config\__init__.py", line 200, in _prepareconfig
pluginmanager=pluginmanager, args=args
File "d:\workspace\calculator\lib\site-packages\pluggy\hooks.py", line 289, in __call__
return self._hookexec(self, self.get_hookimpls(), kwargs)
File "d:\workspace\calculator\lib\site-packages\pluggy\manager.py", line 87, in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
File "d:\workspace\calculator\lib\site-packages\pluggy\manager.py", line 81, in <lambda>
firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
File "d:\workspace\calculator\lib\site-packages\pluggy\callers.py", line 203, in _multicall
gen.send(outcome)
File "d:\workspace\calculator\lib\site-packages\_pytest\helpconfig.py", line 89, in pytest_cmdline_parse
config = outcome.get_result()
File "d:\workspace\calculator\lib\site-packages\pluggy\callers.py", line 80, in get_result
raise ex[1].with_traceback(ex[2])
File "d:\workspace\calculator\lib\site-packages\pluggy\callers.py", line 187, in _multicall
res = hook_impl.function(*args)
File "d:\workspace\calculator\lib\site-packages\_pytest\config\__init__.py", line 661, in pytest_cmdline_parse
self.parse(args)
File "d:\workspace\calculator\lib\site-packages\_pytest\config\__init__.py", line 869, in parse
self._preparse(args, addopts=addopts)
File "d:\workspace\calculator\lib\site-packages\_pytest\config\__init__.py", line 825, in _preparse
early_config=self, args=args, parser=self._parser
File "d:\workspace\calculator\lib\site-packages\pluggy\hooks.py", line 289, in __call__
return self._hookexec(self, self.get_hookimpls(), kwargs)
File "d:\workspace\calculator\lib\site-packages\pluggy\manager.py", line 87, in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
File "d:\workspace\calculator\lib\site-packages\pluggy\manager.py", line 81, in <lambda>
firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
File "d:\workspace\calculator\lib\site-packages\pluggy\callers.py", line 208, in _multicall
return outcome.get_result()
File "d:\workspace\calculator\lib\site-packages\pluggy\callers.py", line 80, in get_result
raise ex[1].with_traceback(ex[2])
File "d:\workspace\calculator\lib\site-packages\pluggy\callers.py", line 182, in _multicall
next(gen) # first yield
File "d:\workspace\calculator\lib\site-packages\_pytest\capture.py", line 42, in pytest_load_initial_conftests
_py36_windowsconsoleio_workaround(sys.stdout)
File "d:\workspace\calculator\lib\site-packages\_pytest\capture.py", line 815, in _py36_windowsconsoleio_workaround
sys.stdin = _reopen_stdio(sys.stdin, "rb")
File "d:\workspace\calculator\lib\site-packages\_pytest\capture.py", line 808, in _reopen_stdio
open(os.dup(f.fileno()), mode, buffering),
OSError: [WinError 87] 参数错误。
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:17 (10 by maintainers)
Top Results From Across the Web
CreateProcess from python results in "OSError: [WinError 87 ...
I have a python program that runs another program as a subprocess. It works fine on linux/mac but on windows I get the...
Read more >Getting error with pytest OSError: [WinError 87] The parameter ...
I have installed pytest but getting the following error ...
Read more >All attempts to run pytest is failing with the same banch of errors
I was able to complete Chapter 1, but pytest is giving me a problem: ... mode, buffering), OSError: [WinError 87] The parameter is...
Read more >Getting error with pytest OSError: [WinError 87] The ... - YouTube
Getting error with pytest OSError : [ WinError 87 ] The parameter is incorrectHelpful? Please support me on Patreon: ...
Read more >Anaconda Package Installation OSError(22, 'The parameter is ...
link:_execute(502): An error occurred while installing package 'conda-forge::pyopengl-3.1.1a1-py_1'. OSError(22, 'The parameter is incorrect', None, 87, None) ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I have reinstalled to use python 3.7.3, and everything works just fine, it seems a compatibility issue between python 3.7.4 and pytest.
Closing this for now given that this was fixed upstream. 👍