-
Notifications
You must be signed in to change notification settings - Fork 239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build failed because docker is too old or is not working properly: json.decoder.JSONDecodeError #2074
Comments
I could run the command from inside WSL, but I thought this command had previously worked when ran from windows |
Actually it should work from windows as per #1782 so not sure whats happening |
@mcleantom could you run the cibuildwheel using
It should add additional context to traceback to allow understand the problem. |
@Czaki Hey, here is the output of that:
|
Hm. It looks like it invoke exe instead of a python file. What with:
|
That output is:
|
Ok. So this module do not overwrite cibuildwheel/cibuildwheel/__main__.py Line 58 in e18a6e9
I need to think about other debug options.. |
I cloned the repo and ran it within pycharm debugger so that it picks up the cibuildwheel that I cloned and it ran fine. Not sure why its not working when I just run from the terminal Even if I use I modified the code to print the version string variable and it says:
|
Seems to be related to docker/for-win#13891 Adding this:
"fixes" it, but I guess I should downgrade/upgrade docker |
Hm. Maybe we should prepare stderr handler that may handle it so it will not be rediretedet to stdout? |
can you try something like the following. If it's the same as on macOS, I suspect the one with
If the one with |
Hey sure, here are those outputs:
And the second one:
And with the full path to docker:
For reference, it is still outputting failed to get console mode for stdout:
|
If I also add
|
does the following works ? (or as a simple test, modifying your previous working test to use diff --git a/cibuildwheel/util.py b/cibuildwheel/util.py
index bfbe50c7..c72a3ddf 100644
--- a/cibuildwheel/util.py
+++ b/cibuildwheel/util.py
@@ -131,9 +131,16 @@ def call(
if capture_stdout:
kwargs["universal_newlines"] = True
kwargs["stdout"] = subprocess.PIPE
- result = subprocess.run(args_, check=True, shell=IS_WIN, env=env, cwd=cwd, **kwargs)
+ kwargs["stderr"] = subprocess.PIPE
+ try:
+ result = subprocess.run(args_, check=True, shell=IS_WIN, env=env, cwd=cwd, **kwargs)
+ except subprocess.CalledProcessError as e:
+ if capture_stdout:
+ sys.stderr.write(e.stderr)
+ raise
if not capture_stdout:
return None
+ sys.stderr.write(result.stderr)
return typing.cast(str, result.stdout)
|
That worked |
So I guess #2076 should fix the issue. |
Description
I am running cibuildwheel version 2.21.3 and I am trying to see if my project will compile for linux wheels, from windows, using the command:
Which fails with the error
Because of a json decode error:
The output of my docker version command is:
So I am not sure why it is failing.
Build log
No response
CI config
No response
The text was updated successfully, but these errors were encountered: