Details
-
Bug
-
Resolution: Cannot Reproduce
-
Not Evaluated
-
None
-
6.6.2
-
None
Description
since 6.6.2 commit 3297df54f240705e5e8058cbae39f3f6e41effb5 "pyside_tool.py: Work around console encoding issues on Windows" https://codereview.qt-project.org/c/pyside/pyside-setup/+/535574
the command "pyside6-rcc -help" hangs with no output on condaforge (windows only)
If I revert or pass stderr=PIPE like in the 6.6.1 version, then it goes fine
here is a possible workaround that still captures the error output from the command with the new subprocess api but with text=True instead of the hardcoded encoding of the 6.6.1 version
diff --git a/sources/pyside-tools/pyside_tool.py b/sources/pyside-tools/pyside_tool.py index 7daacc22d..9356dce9e 100644 --- a/sources/pyside-tools/pyside_tool.py +++ b/sources/pyside-tools/pyside_tool.py @@ -56,11 +56,11 @@ def qt_tool_wrapper(qt_tool, args, libexec=False): exe = pyside_dir / qt_tool cmd = [os.fspath(exe)] + args - returncode = subprocess.call(cmd) - if returncode != 0: + cp = subprocess.run(cmd, stderr=subprocess.PIPE, text=True, errors='replace') + if cp.returncode != 0: command = ' '.join(cmd) - print(f"'{command}' returned {returncode}", file=sys.stderr) - sys.exit(returncode) + print(f"'{command}' returned {cp.returncode}: {cp.stderr}", file=sys.stderr) + sys.exit(cp.returncode) def pyside_script_wrapper(script_name):