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

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Done
    • Affects Version/s: 5.15
    • Fix Version/s: None
    • Component/s: PySide
    • Labels:
      None
    • Platform/s:
      All
    • Commits:
      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

            Assignee:
            ctismer Christian Tismer
            Reporter:
            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