[python-win32] WindowsError: (0, 'The operation completed successfully') with compiled prog only

Thomas Heller theller at python.net
Thu Sep 15 21:05:31 CEST 2005


Ray Schumacher <rays at blue-cove.com> writes:

> Hi all, anyone seen this?
>
> I'm writing a Win98 replacement shell; when I compile with console=[foo] I get no errors logged or in the console, but when compiled with windows=[foo] I get an error when I try to run subprocess:
>
> Traceback (most recent call last): 
>   File "Frame2.pyo", line 75, in OnProcessTimer 
>   File "Frame2.pyo", line 83, in getProcList 
>   File "Frame2.pyo", line 97, in launchWithoutConsole 
>   File "subprocess.pyo", line 549, in __init__ 
>   File "subprocess.pyo", line 626, in _get_handles 
> WindowsError: (0, 'The operation completed successfully')
>
> (?)
>
> My code is:
>
> result = self.launchWithoutConsole('pv', ["-fq",])
>
>     def launchWithoutConsole(self, command, args):
>         """Launches 'command' windowless and waits until finished"""
>         startupinfo = subprocess.STARTUPINFO()
>         startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
>         startupinfo.wShowWindow = win32con.SW_HIDE
>         proc = subprocess.Popen([command] + args, startupinfo=startupinfo, 
>                 shell=False,
>                 bufsize=1000,
>                 stdin=subprocess.PIPE, stdout=subprocess.PIPE
>                 )
>
>         return proc.stdout.readlines()
>
> I've tried many variations, but all (so far) leave a "LAUNCHER.EXE.log" with this error, even if command ="anything else"..
>
> If 'The operation completed successfully' and the error level is zero, why the logged error?
> Can it be suppressed?
>
> I also posted to py2exe-users...

I answered this on the py2exe-users list.

Thomas



More information about the Python-win32 mailing list