[issue35678] subprocess.check_output(): OSError: [WinError 87]

Geoff Alexander report at bugs.python.org
Mon Mar 4 22:14:06 EST 2019


Geoff Alexander <gdlxn at us.ibm.com> added the comment:

I've recently hit this problem (or one that has the same symptoms):

```
Traceback (most recent call last):
  File "migration.py", line 169, in <module>
    migrate()
  File "migration.py", line 80, in migrate
    rtc.acceptchangesintoworkspace(rtc.getchangeentriestoaccept(changeentries, history))
  File "c:\Users\GeoffAlexander\Documents\Nirvana\RTC2Git\git-repositories\rtc2git-migration-tool\rtcFunctions.py", line 310, in acceptchangesintoworkspace
    Commiter.addandcommit(changeEntry)
  File "c:\Users\GeoffAlexander\Documents\Nirvana\RTC2Git\git-repositories\rtc2git-migration-tool\gitFunctions.py", line 97, in addandcommit
    Commiter.handle_captitalization_filename_changes()
  File "c:\Users\GeoffAlexander\Documents\Nirvana\RTC2Git\git-repositories\rtc2git-migration-tool\gitFunctions.py", line 130, in handle_captitalization_filename_changes
    files = shell.getoutput("git ls-files")
  File "c:\Users\GeoffAlexander\Documents\Nirvana\RTC2Git\git-repositories\rtc2git-migration-tool\shell.py", line 33, in getoutput
    outputasbytestring = check_output(command, shell=True)
  File "C:\Users\GeoffAlexander\AppData\Local\Programs\Python\Python36\lib\subprocess.py", line 356, in check_output
    **kwargs).stdout
  File "C:\Users\GeoffAlexander\AppData\Local\Programs\Python\Python36\lib\subprocess.py", line 423, in run
    with Popen(*popenargs, **kwargs) as process:
  File "C:\Users\GeoffAlexander\AppData\Local\Programs\Python\Python36\lib\subprocess.py", line 729, in __init__
    restore_signals, start_new_session)
  File "C:\Users\GeoffAlexander\AppData\Local\Programs\Python\Python36\lib\subprocess.py", line 1017, in _execute_child
    startupinfo)
OSError: [WinError 87] The parameter is incorrect
```

I've tried Python 3.7.2 32-bit, 3.7.2 64-bit, and 3.6.8 64-bit on Windows 10.  The error occurs in a long running Python script after more than one and half hours.  The subprocess.check_output call at shell.py:33 is successfully called hundreds, probably thousands, of times before failing.

I see that the issue is reported as resolved.  But I'm not understanding what is meant by

```
a new version of the code has been released
```

I'm running the latest version of Python, Python 3.7.2, from https://www.python.org/downloads/windows/ (as well as the previous version 3.6.8).  Is there a later version of Python I can try?  Or do I need to get a newer version of the Python subprocess module?

I'm new to Python and wasn't sure if I should reopen this issue or create a new issue.  Please let me know if there any additional information I can collect to help debug this problem.

----------
nosy: +gdlxn at us.ibm.com

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35678>
_______________________________________


More information about the Python-bugs-list mailing list