Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pyside2 completion causes KeyError loop #1294

Closed
djhoese opened this issue Mar 1, 2019 · 16 comments
Closed

Pyside2 completion causes KeyError loop #1294

djhoese opened this issue Mar 1, 2019 · 16 comments

Comments

@djhoese
Copy link

djhoese commented Mar 1, 2019

On a conda python 3.6 environment on OSX using conda-forge packages, I did the following in an ipython session:

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

And get a long list of:

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 never used jedi directly so any help debugging this is appreciated. This may be related to #1287. This happens with jedi 0.12.1 and jedi 0.13.4.

@davidhalter
Copy link
Owner

Can you print the whole traceback if you get a long list? Because I don't see the same thing being repeated.

@djhoese
Copy link
Author

djhoese commented Mar 2, 2019

You asked for it 😉 :

In [1]: from PySide2 import QtCore, QtWidgets, QtGui

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 "", 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'
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 "", 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'
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 "", 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'
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 "", 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'
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 "", 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'
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 "", 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'
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 "", 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'
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 "", 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'
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 "", 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'
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 "", 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'
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 "", 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'
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 "", 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'
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 "", 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'
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 "", 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'
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 "", 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'
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 "", 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'
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 "", 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'
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 "", 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'
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 "", 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'
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 "", 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'
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 "", 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'
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 "", 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'
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 "", 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'
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 "", 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'
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 "", 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'
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 "", 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'
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 "", 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'
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 "", 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'
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 "", 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'
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 "", 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'
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 "", 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'
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 "", 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'
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 "", 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'
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 "", 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'
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 "", 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'
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 "", 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'

@davidhalter
Copy link
Owner

What I really don't understand is that there's no Jedi call in this traceback. I have really no idea what happens here. It's also not a recursion error, which is what you would expect if it was looping. Is this really the whole traceback?

@djhoese
Copy link
Author

djhoese commented Mar 4, 2019

Yes it is the full traceback. You can see the line I typed at the top where I ended it by hitting the tab key. It then printed that huge long thing. Just a wild guess, is it possible my version of ipython is maybe repeatedly calling jedi because maybe jedi returned an empty list or string of possible completions and that was unexpected so it called again? Again, wild guess based on your confusion.

@davidhalter
Copy link
Owner

The problem is that this doesn't help me. Something is missing, I'm not sure how and where it goes missing, but it's not there. This is certainly not the entry point for jedi and there's also no sign of something calling Jedi. So I don't really know what to do with this :/

Can you use the jedi.Interpreter directly? You can probably just use this:

import jedi
from PySide2 import QtCore, QtWidgets, QtGui
completions = jedi.Interpreter('QtCore.', namespaces=[locals()]).completions()
print(completions)

Is the traceback the same?

@djhoese
Copy link
Author

djhoese commented Mar 10, 2019

Putting that in to a script and running it with python 3.6 looks promising:

[<Completion: ClassInfo>, <Completion: Connection>, <Completion: MetaFunction>, <Completion: Property>, <Completion: qAbs>, <Completion: QAbstractAnimation>, <Completion: QAbstractEventDispatcher>, <Completion: QAbstractItemModel>, <Completion: QAbstractListModel>, <Completion: QAbstractProxyModel>, <Completion: QAbstractState>, <Completion: QAbstractTableModel>, <Completion: QAbstractTransition>, <Completion: qAcos>, <Completion: qAddPostRoutine>, <Completion: QAnimationGroup>, <Completion: qApp>, <Completion: qAsin>, <Completion: qAtan>, <Completion: qAtan2>, <Completion: QBasicMutex>, <Completion: QBasicTimer>, <Completion: QBitArray>, <Completion: QBuffer>, <Completion: QByteArray>, <Completion: QByteArrayMatcher>, <Completion: qChecksum>, <Completion: QChildEvent>, <Completion: QCollator>, <Completion: QCollatorSortKey>, <Completion: QCommandLineOption>, <Completion: QCommandLineParser>, <Completion: QCoreApplication>, <Completion: qCritical>, <Completion: QCryptographicHash>, <Completion: QDataStream>, <Completion: QDate>, <Completion: QDateTime>, <Completion: qDebug>, <Completion: QDir>, <Completion: QDirIterator>, <Completion: QDynamicPropertyChangeEvent>, <Completion: QEasingCurve>, <Completion: QElapsedTimer>, <Completion: QEvent>, <Completion: QEventLoop>, <Completion: QEventTransition>, <Completion: qExp>, <Completion: qFabs>, <Completion: QFactoryInterface>, <Completion: qFastCos>, <Completion: qFastSin>, <Completion: qFatal>, <Completion: QFile>, <Completion: QFileDevice>, <Completion: QFileInfo>, <Completion: QFileSelector>, <Completion: QFileSystemWatcher>, <Completion: QFinalState>, <Completion: qFuzzyCompare>, <Completion: qFuzzyIsNull>, <Completion: QGenericArgument>, <Completion: QGenericReturnArgument>, <Completion: QHistoryState>, <Completion: qInstallMessageHandler>, <Completion: QIODevice>, <Completion: qIsFinite>, <Completion: qIsInf>, <Completion: qIsNaN>, <Completion: qIsNull>, <Completion: QItemSelection>, <Completion: QItemSelectionModel>, <Completion: QItemSelectionRange>, <Completion: QJsonArray>, <Completion: QJsonDocument>, <Completion: QJsonParseError>, <Completion: QJsonValue>, <Completion: QLibraryInfo>, <Completion: QLine>, <Completion: QLineF>, <Completion: QLocale>, <Completion: QMargins>, <Completion: QMarginsF>, <Completion: QMessageLogContext>, <Completion: QMetaClassInfo>, <Completion: QMetaEnum>, <Completion: QMetaMethod>, <Completion: QMetaObject>, <Completion: QMetaProperty>, <Completion: QMimeData>, <Completion: QMimeDatabase>, <Completion: QMimeType>, <Completion: QModelIndex>, <Completion: QMutex>, <Completion: QMutexLocker>, <Completion: QObject>, <Completion: QParallelAnimationGroup>, <Completion: QPauseAnimation>, <Completion: QPersistentModelIndex>, <Completion: QPluginLoader>, <Completion: QPoint>, <Completion: QPointF>, <Completion: QProcess>, <Completion: QProcessEnvironment>, <Completion: QPropertyAnimation>, <Completion: qrand>, <Completion: QReadLocker>, <Completion: QReadWriteLock>, <Completion: QRect>, <Completion: QRectF>, <Completion: QRegExp>, <Completion: qRegisterResourceData>, <Completion: QResource>, <Completion: QRunnable>, <Completion: QSaveFile>, <Completion: QSemaphore>, <Completion: QSequentialAnimationGroup>, <Completion: QSettings>, <Completion: QSignalMapper>, <Completion: QSignalTransition>, <Completion: QSize>, <Completion: QSizeF>, <Completion: QSocketNotifier>, <Completion: QSortFilterProxyModel>, <Completion: qsrand>, <Completion: QStandardPaths>, <Completion: QState>, <Completion: QStateMachine>, <Completion: QStorageInfo>, <Completion: QStringListModel>, <Completion: QSysInfo>, <Completion: QSystemSemaphore>, <Completion: Qt>, <Completion: QT_TR_NOOP>, <Completion: QT_TR_NOOP_UTF8>, <Completion: QT_TRANSLATE_NOOP>, <Completion: QT_TRANSLATE_NOOP3>, <Completion: QT_TRANSLATE_NOOP_UTF8>, <Completion: qTan>, <Completion: QtCriticalMsg>, <Completion: QtDebugMsg>, <Completion: QTemporaryDir>, <Completion: QTemporaryFile>, <Completion: QTextBoundaryFinder>, <Completion: QTextCodec>, <Completion: QTextDecoder>, <Completion: QTextEncoder>, <Completion: QTextStream>, <Completion: QTextStreamManipulator>, <Completion: QtFatalMsg>, <Completion: QThread>, <Completion: QThreadPool>, <Completion: QTime>, <Completion: QTimeLine>, <Completion: QTimer>, <Completion: QTimerEvent>, <Completion: QTimeZone>, <Completion: QtInfoMsg>, <Completion: QtMsgType>, <Completion: QTranslator>, <Completion: QtSystemMsg>, <Completion: qtTrId>, <Completion: QtWarningMsg>, <Completion: qUnregisterResourceData>, <Completion: QUrl>, <Completion: QVariantAnimation>, <Completion: qVersion>, <Completion: QWaitCondition>, <Completion: qWarning>, <Completion: QWriteLocker>, <Completion: QXmlStreamAttribute>, <Completion: QXmlStreamAttributes>, <Completion: QXmlStreamEntityDeclaration>, <Completion: QXmlStreamEntityResolver>, <Completion: QXmlStreamNamespaceDeclaration>, <Completion: QXmlStreamNotationDeclaration>, <Completion: QXmlStreamReader>, <Completion: QXmlStreamWriter>, <Completion: SIGNAL>, <Completion: Signal>, <Completion: SLOT>, <Completion: Slot>, <Completion: __doc__>, <Completion: __file__>, <Completion: __loader__>, <Completion: __moduleShutdown>, <Completion: __name__>, <Completion: __package__>, <Completion: __spec__>, <Completion: __version__>, <Completion: __version_info__>]

Same thing run from within ipython. I wonder if this is a bug in pyside2 and/or ipython and the traceback is just showing jedi. If you have other ideas I'm willing to try them. I can try doing some deeper debugging (pdb breakpoints, ipython, etc).

@davidhalter
Copy link
Owner

To be honest I have no idea at this point. The question is probably: What is different between the Interpreter call I gave you and the one IPython does.

@davidhalter
Copy link
Owner

Does it still happen with Jedi 0.14.0?

@djhoese
Copy link
Author

djhoese commented Jun 24, 2019

Using Jedi 0.14.0, Qt 5.6.2, Pyside2 5.6.0a1, and ipython 7.5.0 all with a conda environment using packages from conda-forge, I still get this issue.

@davidhalter
Copy link
Owner

Can you run:

import jedi
from PySide2 import QtCore, QtWidgets, QtGui
completions = jedi.Interpreter('QtCore.', namespaces=[locals()]).completions()
print([getattr(c, 'params', None) for c in completions])

@djhoese
Copy link
Author

djhoese commented Jun 25, 2019

$ ipython
Python 3.6.7 | packaged by conda-forge | (default, Feb 28 2019, 02:16:08) 
Type 'copyright', 'credits' or 'license' for more information
IPython 7.5.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import jedi                                                                                                                                                                        

In [2]: from PySide2 import QtCore, QtWidgets, QtGui                                                                                                                                       

In [3]: completions = jedi.Interpreter('QtCore.', namespaces=[locals()]).completions()                                                                                                     

In [4]: print([getattr(c, 'params', None) for c in completions])                                                                                                                           
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 141, 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 141, 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'
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 141, in wrapper
    return dct[key]
KeyError: ((), 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'
[[<Definition full_name=None, description='param '>], [<Definition full_name=None, description='param '>], [<Definition full_name=None, description='param '>], [<Definition full_name=None, description='param '>], [<Definition full_name=None, description='param '>], [<Definition full_name=None, description='param '>],
...

@davidhalter
Copy link
Owner

Hmm this might be something about inspect.signature. I'm not really sure how all of that works inside Python. Part of the issue might be that this is not even an exception that propagates to Jedi, but just a print. I have no idea where this print would be coming from, but it's pretty clear that Jedi doesn't "fail". It completes everything, you get the right result and you end up with a lot of traceback bullshit.

So the problem now is really, where does this print come from??!!

@djhoese
Copy link
Author

djhoese commented Jul 2, 2019

Ok so I think I have a traceback that may be valid. You'll have to tell me if it looks right and makes any sense. I captured the output using IPython's utilities for capturing output. However, I didn't want to just capture it I wanted to know where it was coming from. I ran it once as normal and found it was all being printed to stdout. So I created the following:

class FakeStdOut(StringIO): 
    def write(self, *args): 
        super(FakeStdOut, self).write("DEBUG:\n") 
        for line in traceback.format_stack(): 
            super(FakeStdOut, self).write(line) 
        super(FakeStdOut, self).write("END DEBUG\n") 

And copied the captured_output class from IPython's utilities:

class capture_output(object):
    """context manager for capturing stdout/err""" 
    stdout = True 
    stderr = True 

    def __init__(self, stdout=True, stderr=True): 
        self.stdout = stdout 
        self.stderr = stderr 

    def __enter__(self): 
        self.sys_stdout = sys.stdout 
        self.sys_stderr = sys.stderr 

        stdout = stderr = False 
        if self.stdout: 
            stdout = sys.stdout = FakeStdOut()  # the only custom change here
        if self.stderr: 
            stderr = sys.stderr = StringIO() 
         
        return CapturedIO(stdout, stderr) 

    def __exit__(self, exc_type, exc_value, traceback): 
        sys.stdout = self.sys_stdout 
        sys.stderr = self.sys_stderr 

Then did:

with capture_output() as captured: 
    import jedi 
    from PySide2 import QtCore, QtWidgets, QtGui 
    completions = jedi.Interpreter('QtCore.', namespaces=[locals()]).completions()  
    x = [getattr(c, 'params', None) for c in completions] 

print(captured.stdout[:captured.stdout.index('END DEBUG')]) 

And got:

DEBUG:
  File "/Users/davidh/anaconda/envs/vispy_test_pyside2/bin/ipython", line 11, in <module>
    sys.exit(start_ipython())
  File "/Users/davidh/anaconda/envs/vispy_test_pyside2/lib/python3.6/site-packages/IPython/__init__.py", line 125, in start_ipython
    return launch_new_instance(argv=argv, **kwargs)
  File "/Users/davidh/anaconda/envs/vispy_test_pyside2/lib/python3.6/site-packages/traitlets/config/application.py", line 658, in launch_instance
    app.start()
  File "/Users/davidh/anaconda/envs/vispy_test_pyside2/lib/python3.6/site-packages/IPython/terminal/ipapp.py", line 356, in start
    self.shell.mainloop()
  File "/Users/davidh/anaconda/envs/vispy_test_pyside2/lib/python3.6/site-packages/IPython/terminal/interactiveshell.py", line 498, in mainloop
    self.interact()
  File "/Users/davidh/anaconda/envs/vispy_test_pyside2/lib/python3.6/site-packages/IPython/terminal/interactiveshell.py", line 489, in interact
    self.run_cell(code, store_history=True)
  File "/Users/davidh/anaconda/envs/vispy_test_pyside2/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2848, in run_cell
    raw_cell, store_history, silent, shell_futures)
  File "/Users/davidh/anaconda/envs/vispy_test_pyside2/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2874, in _run_cell
    return runner(coro)
  File "/Users/davidh/anaconda/envs/vispy_test_pyside2/lib/python3.6/site-packages/IPython/core/async_helpers.py", line 67, in _pseudo_sync_runner
    coro.send(None)
  File "/Users/davidh/anaconda/envs/vispy_test_pyside2/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 3049, in run_cell_async
    interactivity=interactivity, compiler=compiler, result=result)
  File "/Users/davidh/anaconda/envs/vispy_test_pyside2/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 3214, in run_ast_nodes
    if (yield from self.run_code(code, result)):
  File "/Users/davidh/anaconda/envs/vispy_test_pyside2/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 3296, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-21-fae7911a0407>", line 5, in <module>
    x = [getattr(c, 'params', None) for c in completions]
  File "<ipython-input-21-fae7911a0407>", line 5, in <listcomp>
    x = [getattr(c, 'params', None) for c in completions]
  File "/Users/davidh/anaconda/envs/vispy_test_pyside2/lib/python3.6/site-packages/jedi/cache.py", line 143, in wrapper
    result = method(self, *args, **kwargs)
  File "/Users/davidh/anaconda/envs/vispy_test_pyside2/lib/python3.6/site-packages/jedi/api/classes.py", line 340, in params
    return [Definition(self._evaluator, n) for n in signature.get_param_names()]
  File "/Users/davidh/anaconda/envs/vispy_test_pyside2/lib/python3.6/site-packages/jedi/evaluate/signature.py", line 47, in get_param_names
    param_names = self._function_context.get_param_names()
  File "/Users/davidh/anaconda/envs/vispy_test_pyside2/lib/python3.6/site-packages/jedi/evaluate/utils.py", line 20, in wrapper
    return list(func(*args, **kwargs))
  File "/Users/davidh/anaconda/envs/vispy_test_pyside2/lib/python3.6/site-packages/jedi/evaluate/compiled/context.py", line 122, in get_param_names
    signature_params = self.access_handle.get_signature_params()
  File "/Users/davidh/anaconda/envs/vispy_test_pyside2/lib/python3.6/site-packages/jedi/evaluate/compiled/subprocess/__init__.py", line 398, in _workaround
    return self._cached_results(name, *args, **kwargs)
  File "/Users/davidh/anaconda/envs/vispy_test_pyside2/lib/python3.6/site-packages/jedi/cache.py", line 143, in wrapper
    result = method(self, *args, **kwargs)
  File "/Users/davidh/anaconda/envs/vispy_test_pyside2/lib/python3.6/site-packages/jedi/evaluate/compiled/subprocess/__init__.py", line 406, in _cached_results
    return self._subprocess.get_compiled_method_return(self.id, name, *args, **kwargs)
  File "/Users/davidh/anaconda/envs/vispy_test_pyside2/lib/python3.6/site-packages/jedi/evaluate/compiled/subprocess/functions.py", line 21, in get_compiled_method_return
    return getattr(handle.access, attribute)(*args, **kwargs)
  File "/Users/davidh/anaconda/envs/vispy_test_pyside2/lib/python3.6/site-packages/jedi/evaluate/compiled/access.py", line 420, in get_signature_params
    ) for p in self._get_signature().parameters.values()
  File "/Users/davidh/anaconda/envs/vispy_test_pyside2/lib/python3.6/site-packages/jedi/evaluate/compiled/access.py", line 444, in _get_signature
    return inspect.signature(obj)
  File "/Users/davidh/anaconda/envs/vispy_test_pyside2/lib/python3.6/inspect.py", line 3057, in signature
    return Signature.from_callable(obj, follow_wrapped=follow_wrapped)
  File "/Users/davidh/anaconda/envs/vispy_test_pyside2/lib/python3.6/inspect.py", line 2807, in from_callable
    follow_wrapper_chains=follow_wrapped)
  File "/Users/davidh/anaconda/envs/vispy_test_pyside2/lib/python3.6/inspect.py", line 2221, in _signature_from_callable
    sig = obj.__signature__
  File "<string>", line 10, in bootstrap
  File "<ipython-input-20-239c60292fef>", line 4, in write
    for line in traceback.format_stack():

Thoughts?

@davidhalter
Copy link
Owner

davidhalter commented Jul 3, 2019

Interesting. It looks like __signature__ is probably overwritten for a by something dynamic like __get__ descriptors. It might also be created dynamically. I guess I found the piece of code that is responsible for this:

https://github.com/pyside/pyside2-setup/blob/ff8b698d3547b39ba20c97a4c68881a4a789b211/sources/shiboken2/libshiboken/signature.cpp#L403

There you have the print statement. I guess this is not really a Jedi issue. Please open an issue there. Happy to keep discussing this, though.

@djhoese
Copy link
Author

djhoese commented Jul 3, 2019

Thanks. I've created an issue on pyside's bug tracker. I'm a little worried that conda-forge only having 5.6 and there being much newer versions (5.11, 5.12, 5.13). Hopefully it isn't already fixed, but it would be hard for me to test.

@davidhalter
Copy link
Owner

Just in case this annoys you too much for now: You could probably just copy this directory: https://github.com/pyside/pyside2-setup/blob/ff8b698d3547b39ba20c97a4c68881a4a789b211/sources/pyside2/PySide2/support/signature/loader.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants