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

Reg->5.15.1: Exception on subseqent import following QtCore import when used from embedded Python

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • None
    • 5.15.3
    • PySide
    • None
    • All
    • d3b523ef428d299b4d6e860cfa282da942924cfa (pyside/pyside-setup/5.15)

    Description

      In the file shibokenmodule/files.dir/shibokensupport/__feature__.py  line 107 reads:

          importing_module = sys._getframe(1).f_globals.get("__name__", "__main__")

      When using embedded Python, this may result in ValueError: call stack is not deep enough and crash. I suggest replacing it with:

      try:
          importing_module = sys._getframe(1).f_globals.get("__name__", "__main__")
      except ValueError:
          importing_module = "__main__"

      With this change PySide2 can again work in embedded Python.

      Attachments

        1. main.cpp
          2 kB
        2. pyside1398.zip
          6 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            ctismer Christian Tismer
            macdems Maciej Dems
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes