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

Bug in Snippet Conversion import

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 6.1
    • 6.0.2
    • PySide
    • None
    • macOS
    • 3dc9ee1b1bea5b39b2997b214c99f5cc9b827ab7 (pyside/pyside-setup/dev) d9437d7c4935febe28f26557f0785d559dd537a2 (pyside/pyside-setup/6.0.4)

    Description

      When the following command line is run for the first time, a Python crash happens:

      python3 setup.py install --debug --no-qt-tools --no-examples --ignore-git  \
          --reuse-build --parallel=8 --build-tests --module-subset=Core,Gui,Widgets
      

      When run a second time, things work.
      Excerpt from the log output:

      -- PySide will be generated using the protected hack!
      -- preparing tests for module 'QtCore'
      -- preparing tests for module 'QtGui'
      -- preparing tests for module 'QtWidgets'
      -- Fetching and converting snippets
      Traceback (most recent call last):
        File "/Users/tismer/src/QtC/pyside-setup/sources/pyside6/doc/../../../tools/snippets_translate/main.py", line 50, in <module>
          from converter import snippet_translate
        File "/Users/tismer/src/QtC/pyside-setup/tools/snippets_translate/converter.py", line 43, in <module>
          from handlers import (handle_casts, handle_class, handle_condition,
        File "/Users/tismer/src/QtC/pyside-setup/tools/snippets_translate/handlers.py", line 42, in <module>
          from parse_utils import get_indent, dstrip, remove_ref, parse_arguments, replace_main_commas, get_qt_module_class
        File "/Users/tismer/src/QtC/pyside-setup/tools/snippets_translate/parse_utils.py", line 44, in <module>
          from PySide6 import *
      AttributeError: module 'PySide6' has no attribute 'QtCore'
      -- Generating example gallery
      Written: /Users/tismer/src/QtC/pyside-setup/sources/pyside6/doc/../../../tools/example_gallery/../../sources/pyside6/doc/examples/example_datavisualization__bars3d.rst
      

      This seems to be a path/timing problem, because an import from PySide6 import * is attempted, but the found PySide6 directory is still empty.

      Attachments

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

        Activity

          People

            crmaurei Cristian Maureira-Fredes
            ctismer Christian Tismer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes