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

pyside6-lupdate blocks when the input file has no symbols in it.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3: Somewhat important
    • 6.6.0
    • 6.5.0
    • Tooling
    • None
    • Linux/Other display system
    • fc7bfd986 (dev), 0a1d7c635 (6.5)

    Description

      Python version: 3.10.10

      1. Target

      I want to generate the ts file from my python file. When I use the 'pyside6-lupdate', a problem arised.

      2. Reoccurrence

      Python file had the content below:

      ...........start...........

       # I am a comment.
      
       # And I don't have any symbol.
      

      ...........end............
      Then I tried exec the command like "pyside6-lupdate ${python_file} -ts demo.ts" and it blocked. I pressed 'Ctrl + C' after a while, and it raised an exception:

      Traceback (most recent call last):
        File "~/.cache/pypoetry/virtualenvs/**v1QjudkM-py3.10/bin/pyside6-lupdate", line 8, in <module>
          sys.exit(lupdate())
        File "~/.cache/pypoetry/virtualenvs/**-v1QjudkM-py3.10/lib/python3.10/site-packages/PySide6/scripts/pyside_tool.py", line 79, in lupdate
          qt_tool_wrapper("lupdate", sys.argv[1:])
        File "~/.cache/pypoetry/virtualenvs/**-v1QjudkM-py3.10/lib/python3.10/site-packages/PySide6/scripts/pyside_tool.py", line 50, in qt_tool_wrapper
          out, err = proc.communicate()
        File "/usr/lib/python3.10/subprocess.py", line 1144, in communicate
          stderr = self.stderr.read()
      

      The cpu is occupied because the 'lupdate' process using the single-core 100.
      When I changed the python file to the content below, it works.

      ...........start...........

      # I am a comment.
      
      # And I have a symbol.
      
      a = 3
      

      ...........end...........

       

      This problem often occurs in the _init_.py file.

      Attachments

        1. failed.py
          0.1 kB
          lala looo
        2. pyside2311_stack.txt
          14 kB
          Friedemann Kleint
        3. success.py
          0.0 kB
          lala looo
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kleint Friedemann Kleint
            lala lala looo
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes