Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. Any access to QtCore through PySide2 causes errors with autocomplete, help(QtCore) causes fatal python error then crashes python
Forum Updated to NodeBB v4.3 + New Features

Any access to QtCore through PySide2 causes errors with autocomplete, help(QtCore) causes fatal python error then crashes python

Scheduled Pinned Locked Moved Solved Qt for Python
pyside2qt for python
3 Posts 2 Posters 873 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jdex24
    wrote on 27 Apr 2020, 09:11 last edited by
    #1

    Hi all,

    this is my first time posting so go easy on me. Ive been using Qt for Python on and off for a few years however this is the first time I've had issues with QtCore.

    I'm using Python with windows 10: installed everything below from executable or through Pip
    Python: 3.8.2
    PySide2: v5.14
    PyQt5: v5.14
    Eclipse IDE with PyDev

    I am able to import from PySide2 any module required, and at runtime everything is per normal.

    However in my IDE the QtCore import throws a warning displaying "Unresolved Import:Qt, Slot etc etc" This is more of an annoyance than anything as it highlights half of my code with errors. I'm also unable to access the autocomplete for anything QtCore related.

    Things I've tried prior to asking for help:

    • uninstalled all other python versions to be sure it was grabbing the correct PySide2

    • updated PySide2 with pip yesterday

    • Installed PyQt5 to check QtCore there and that imports as expected with none of these issues described in this post.

    • I thought maybe it was an issue with my IDE so I ran Python 3.8.2 from CMD and attempted the import from there. A request for help(module) returns expected for all modules except QtCore where it gives me this error:

    C:\Users\OEM>python
    Python 3.8.2 (tags/v3.8.2:7b3ab59, Feb 25 2020, 23:03:10) [MSC v.1916 64 bit (AMD64)] on win32
    Type "help", "copyright", "credits" or "license" for more information.
    >>> from PySide2 import QtCore
    >>> help(QtCore)
    Traceback (most recent call last):
      File "C:\Users\OEM\AppData\Local\Programs\Python\Python38\Lib\site-packages\shiboken2\files.dir\shibokensupport\signature\loader.py", line 105, in make_helptext
        return errorhandler.make_helptext(func)
      File "C:\Users\OEM\AppData\Local\Programs\Python\Python38\Lib\site-packages\shiboken2\files.dir\shibokensupport\signature\errorhandler.py", line 138, in make_helptext
        msg = sigtext + "\n\n" + existing_doc if existing_doc else sigtext
    TypeError: can only concatenate str (not "getset_descriptor") to str
    Fatal Python error: handle_doc did not receive a result
    Python runtime state: initialized
    
    Current thread 0x000031f8 (most recent call first):
      File "C:\Users\OEM\AppData\Local\Programs\Python\Python38\lib\inspect.py", line 613 in getdoc
      File "C:\Users\OEM\AppData\Local\Programs\Python\Python38\lib\pydoc.py", line 95 in getdoc
      File "C:\Users\OEM\AppData\Local\Programs\Python\Python38\lib\pydoc.py", line 1240 in docclass
      File "C:\Users\OEM\AppData\Local\Programs\Python\Python38\lib\pydoc.py", line 381 in document
      File "C:\Users\OEM\AppData\Local\Programs\Python\Python38\lib\pydoc.py", line 1178 in docmodule
      File "C:\Users\OEM\AppData\Local\Programs\Python\Python38\lib\pydoc.py", line 380 in document
      File "C:\Users\OEM\AppData\Local\Programs\Python\Python38\lib\pydoc.py", line 1680 in render_doc
      File "C:\Users\OEM\AppData\Local\Programs\Python\Python38\lib\pydoc.py", line 1687 in doc
      File "C:\Users\OEM\AppData\Local\Programs\Python\Python38\lib\pydoc.py", line 1967 in help
      File "C:\Users\OEM\AppData\Local\Programs\Python\Python38\lib\pydoc.py", line 1908 in __call__
      File "C:\Users\OEM\AppData\Local\Programs\Python\Python38\lib\_sitebuiltins.py", line 103 in __call__
      File "<stdin>", line 1 in <module>
    

    I thought maybe its an administrator restriction however running Python with administrator rights turned no results either.

    Any help would be greatly appreciated
    Cheers Jesse

    1 Reply Last reply
    0
    • J Offline
      J Offline
      jdex24
      wrote on 28 Apr 2020, 04:42 last edited by
      #2

      Cheers for the reply Denni,

      I'll look through the bug reports for PySide2 and see if there's any mention of the above issue. A lot of the bugs there go over my head. Continuing with PyQt5 for now.

      Will report back with an answer if I find one.

      1 Reply Last reply
      0
      • J Offline
        J Offline
        jdex24
        wrote on 2 May 2020, 00:15 last edited by
        #3

        Bug fixed PYSIDE-1272
        This will be included in 5.14.2.2 and 5.15

        I rolled back my PySide2 version to 5.14.1 where this was still working.

        1 Reply Last reply
        1

        1/3

        27 Apr 2020, 09:11

        • Login

        • Login or register to search.
        1 out of 3
        • First post
          1/3
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved