Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-2614

pyside6-rcc hangs

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • Not Evaluated
    • None
    • 6.6.2
    • Tooling
    • None
    • Windows

    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):
      

       

       

       

       

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            crmaurei Cristian Maureira-Fredes
            jschueller Julien Schueller
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes