Skip to content
This repository has been archived by the owner on Apr 19, 2022. It is now read-only.

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

Open
VincentHuysmans opened this issue Feb 20, 2019 · 0 comments

Comments

@VincentHuysmans
Copy link

VincentHuysmans commented Feb 20, 2019

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant