snakebite icon indicating copy to clipboard operation
snakebite copied to clipboard

subprocess.Popen in minicluster on Windows causes OSError: [WinError 193] %1 is not a valid Win32 application

Open VincentHuysmans opened this issue 5 years ago • 0 comments

I'm using Python 2.7.15 in PyCharm on Windows 10.

I'm trying to write a unittest using minicluster.py (snakebite 2.11.0). I have following code:

        cluster = MiniCluster('/test-files')
        client = Client('localhost', cluster.port)
        self.file_utils = FileUtilsMock(client)

When running this code I get

OSError: [WinError 193] %1 is not a valid Win32 application

I found out that

subprocess.Popen(cmd, bufsize=0, stdout=subprocess.PIPE,
                                     stderr=subprocess.PIPE, universal_newlines=True)

on line 190 of minicluster.py is causing this problem, which may be related with https://stackoverflow.com/questions/912830/using-subprocess-to-run-python-script-on-windows

VincentHuysmans avatar Feb 20 '19 13:02 VincentHuysmans