I have auto-complete and jedi installed and everything works just fine except autocompletion in PyQt5. When i try to subclass for example QWidget and in the __init__ method I type self and then press dot on my keyboard which triggers autocompletion popup it gives me an error:

deffered error : (error "RuntimeError('generator raised StopIteration')")

When I issue command jedi:pop-to-epc-buffer I see a number 56977 and repeated error message.

Here's my emacs config reffered to jedi:

(use-package jedi
  :ensure t
  (add-hook 'python-mode-hook 'jedi:setup))

(setq jedi:complete-on-dot t)

Any ideas what causes this error?


This is sample code (# is the position of cursor):

from PyQt5.QtWidgets import QWidget

class MyWidget(QWidget):
    def __init__(self, parent = None):
  • Can you add a minimal example of code that's causing your problem (I'm talking about relevant imports and whatnot). This would definitely help people who have experience with this. – DoMiNeLa10 Dec 2 '18 at 21:48
  • 1
    Ok, check EDIT section – gribvirus74 Dec 2 '18 at 21:57
  • Obligatory "did you run Emacs without the init?" comment. Run emacs -q to load Emacs without the init and then run the elisp you provide. Does it work then or is it the same problem? – Lorem Ipsum Dec 3 '18 at 13:09
  • I did what you said and it still gives me the same error. The only difference is the number after issuing jedi:pop-to-epc-buffer which is now 46605 but I guess that it's only some process id or something. – gribvirus74 Dec 4 '18 at 18:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.