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

Tab completion in ipython prints exceptions

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P4: Low
    • 5.13.2
    • 5.12.0
    • PySide, Shiboken
    • None
    • Anaconda Python, ipython 7.5.0, pyside2 5.6.0a1, all packages from the conda-forge collection of packages.

    Description

      While trying to use PySide2 in ipython, I discovered:

      from PySide2 import QtCore, QtWidgets, QtGui
      QtCore.<tab>

       

      Will produce a long list of printed exceptions to stdout:

       

      Exception: [Errno 2] No such file or directory: '/Users/davidh/anaconda/envs/vispy_test_pyside2/lib/python3.6/site-packages/PySide2/support/signature/loader.py'
      Traceback (most recent call last):
        File "/Users/davidh/anaconda/envs/vispy_test_pyside2/lib/python3.6/site-packages/jedi/cache.py", line 140, in wrapper
          return dct[key]
      KeyError: ((), frozenset())
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "/Users/davidh/anaconda/envs/vispy_test_pyside2/lib/python3.6/site-packages/jedi/cache.py", line 140, in wrapper
          return dct[key]
      KeyError: (('get_signature_params',), frozenset())
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "<string>", line 7, in bootstrap
      FileNotFoundError: [Errno 2] No such file or directory: '/Users/davidh/anaconda/envs/vispy_test_pyside2/lib/python3.6/site-packages/PySide2/support/signature/loader.py'

       

      {}

      I've discussed this with the developers of "jedi", the library that helps with tab completion in ipython, to narrow the issue down to where it looks like this may be an issue in PySide2. You can see the discussion with them here: https://github.com/davidhalter/jedi/issues/1294

      The end result of the conversation points to this piece of pyside/shiboken: https://github.com/pyside/pyside2-setup/blob/ff8b698d3547b39ba20c97a4c68881a4a789b211/sources/shiboken2/libshiboken/signature.cpp#L403

       

      Note: I don't have access to PySide2 5.12 as 5.6 is the only version available with conda-forge.

      Attachments

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

        Activity

          People

            crmaurei Cristian Maureira-Fredes
            djhoese David Hoese
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes