tkf / emacs-jedi

Python auto-completion for Emacs
http://tkf.github.io/emacs-jedi/latest/
666 stars 89 forks source link

wrong-number-of-arguments error when trying to use emacs-jedi #298

Open dov opened 6 years ago

dov commented 6 years ago

I tried to install emacs-jedi manually, but I could not get it to work. Here is the error message that I got after turning on deferred:debug. I tried the el files both from HEAD and from the latest tag v0.2.7 . Is this a bug or a misconfiguration on my part?

Debugger entered--Lisp error: (wrong-number-of-arguments (((it . [cl-struct-deferred jedi:get-in-function-call--tooltip-show deferred:default-errorback deferred:default-cancel [cl-struct-deferred (closure ((callback closure ((it . #5) t) nil (setq jedi:get-in-function-call--d nil)) (callback closure ((it . #5) t) nil (setq jedi:get-in-function-call--d nil)) (d . #4) cl-struct-deferred-tags t) (x) (condition-case nil (progn (deferred:call-lambda callback x)) (error nil)) x) (closure ((normal closure ((callback closure ((it . #5) t) nil (setq jedi:get-in-function-call--d nil)) (callback closure ((it . #5) t) nil (setq jedi:get-in-function-call--d nil)) (d . #4) cl-struct-deferred-tags t) (x) (condition-case nil (progn (deferred:call-lambda callback x)) (error nil)) x) (callback closure ((it . #5) t) nil (setq jedi:get-in-function-call--d nil)) (callback closure ((it . #5) t) nil (setq jedi:get-in-function-call--d nil)) (d . #4) cl-struct-deferred-tags t) (e) (condition-case nil (progn (deferred:call-lambda callback e)) (error nil)) (deferred:resignal e)) deferred:default-cancel nil nil nil] nil nil]) (it . [cl-struct-deferred (closure ((callback closure (#3 t) nil (setq jedi:get-in-function-call--d nil)) (callback closure (#3 t) nil (setq jedi:get-in-function-call--d nil)) (d . [cl-struct-deferred jedi:get-in-function-call--tooltip-show deferred:default-errorback deferred:default-cancel #4 nil nil]) cl-struct-deferred-tags t) (x) (condition-case nil (progn (deferred:call-lambda callback x)) (error nil)) x) (closure ((normal closure ((callback closure (#3 t) nil (setq jedi:get-in-function-call--d nil)) (callback closure (#3 t) nil (setq jedi:get-in-function-call--d nil)) (d . [cl-struct-deferred jedi:get-in-function-call--tooltip-show deferred:default-errorback deferred:default-cancel #4 nil nil]) cl-struct-deferred-tags t) (x) (condition-case nil (progn (deferred:call-lambda callback x)) (error nil)) x) (callback closure (#3 t) nil (setq jedi:get-in-function-call--d nil)) (callback closure (#3 t) nil (setq jedi:get-in-function-call--d nil)) (d . [cl-struct-deferred jedi:get-in-function-call--tooltip-show deferred:default-errorback deferred:default-cancel #4 nil nil]) cl-struct-deferred-tags t) (e) (condition-case nil (progn (deferred:call-lambda callback e)) (error nil)) (deferred:resignal e)) deferred:default-cancel nil nil nil]) t) nil (if jedi-mode (progn (deferred:earlier (deferred:nextc (deferred:wait jedi:get-in-function-call-timeout) (function (lambda (x) nil))) (jedi:call-deferred (quote get_in_function_call)))))) 1)
  (closure ((it . [cl-struct-deferred jedi:get-in-function-call--tooltip-show deferred:default-errorback deferred:default-cancel [cl-struct-deferred (closure ((callback closure ... nil ...) (callback closure ... nil ...) (d . #3) cl-struct-deferred-tags t) (x) (condition-case nil (progn ...) (error nil)) x) (closure ((normal closure ... ... ... x) (callback closure ... nil ...) (callback closure ... nil ...) (d . #3) cl-struct-deferred-tags t) (e) (condition-case nil (progn ...) (error nil)) (deferred:resignal e)) deferred:default-cancel nil nil nil] nil nil]) (it . [cl-struct-deferred (closure ((callback closure (#2 t) nil (setq jedi:get-in-function-call--d nil)) (callback closure (#2 t) nil (setq jedi:get-in-function-call--d nil)) (d . [cl-struct-deferred jedi:get-in-function-call--tooltip-show deferred:default-errorback deferred:default-cancel #3 nil nil]) cl-struct-deferred-tags t) (x) (condition-case nil (progn (deferred:call-lambda callback x)) (error nil)) x) (closure ((normal closure (... ... ... cl-struct-deferred-tags t) (x) (condition-case nil ... ...) x) (callback closure (#2 t) nil (setq jedi:get-in-function-call--d nil)) (callback closure (#2 t) nil (setq jedi:get-in-function-call--d nil)) (d . [cl-struct-deferred jedi:get-in-function-call--tooltip-show deferred:default-errorback deferred:default-cancel #3 nil nil]) cl-struct-deferred-tags t) (e) (condition-case nil (progn (deferred:call-lambda callback e)) (error nil)) (deferred:resignal e)) deferred:default-cancel nil nil nil]) t) nil (if jedi-mode (progn (deferred:earlier (deferred:nextc (deferred:wait jedi:get-in-function-call-timeout) (function (lambda (x) nil))) (jedi:call-deferred (quote get_in_function_call))))))(1002.1636486053467)
  funcall((closure ((it . [cl-struct-deferred jedi:get-in-function-call--tooltip-show deferred:default-errorback deferred:default-cancel [cl-struct-deferred (closure ((callback closure ... nil ...) (callback closure ... nil ...) (d . #3) cl-struct-deferred-tags t) (x) (condition-case nil (progn ...) (error nil)) x) (closure ((normal closure ... ... ... x) (callback closure ... nil ...) (callback closure ... nil ...) (d . #3) cl-struct-deferred-tags t) (e) (condition-case nil (progn ...) (error nil)) (deferred:resignal e)) deferred:default-cancel nil nil nil] nil nil]) (it . [cl-struct-deferred (closure ((callback closure (#2 t) nil (setq jedi:get-in-function-call--d nil)) (callback closure (#2 t) nil (setq jedi:get-in-function-call--d nil)) (d . [cl-struct-deferred jedi:get-in-function-call--tooltip-show deferred:default-errorback deferred:default-cancel #3 nil nil]) cl-struct-deferred-tags t) (x) (condition-case nil (progn (deferred:call-lambda callback x)) (error nil)) x) (closure ((normal closure (... ... ... cl-struct-deferred-tags t) (x) (condition-case nil ... ...) x) (callback closure (#2 t) nil (setq jedi:get-in-function-call--d nil)) (callback closure (#2 t) nil (setq jedi:get-in-function-call--d nil)) (d . [cl-struct-deferred jedi:get-in-function-call--tooltip-show deferred:default-errorback deferred:default-cancel #3 nil nil]) cl-struct-deferred-tags t) (e) (condition-case nil (progn (deferred:call-lambda callback e)) (error nil)) (deferred:resignal e)) deferred:default-cancel nil nil nil]) t) nil (if jedi-mode (progn (deferred:earlier (deferred:nextc (deferred:wait jedi:get-in-function-call-timeout) (function (lambda (x) nil))) (jedi:call-deferred (quote get_in_function_call)))))) 1002.1636486053467)
  (condition-case err (funcall f arg) ((quote wrong-number-of-arguments) (display-warning (quote deferred) "Callback that takes no argument may be specified.\nPassing callback with no argument is deprecated.\nCallback must take one argument.\nOr, this error is coming from somewhere inside of the callback: %S" err) (condition-case nil (funcall f) ((quote wrong-number-of-arguments) (signal (quote wrong-number-of-arguments) (cdr err))))))
  deferred:call-lambda((closure ((it . [cl-struct-deferred jedi:get-in-function-call--tooltip-show deferred:default-errorback deferred:default-cancel [cl-struct-deferred (closure ((callback closure ... nil ...) (callback closure ... nil ...) (d . #3) cl-struct-deferred-tags t) (x) (condition-case nil (progn ...) (error nil)) x) (closure ((normal closure ... ... ... x) (callback closure ... nil ...) (callback closure ... nil ...) (d . #3) cl-struct-deferred-tags t) (e) (condition-case nil (progn ...) (error nil)) (deferred:resignal e)) deferred:default-cancel nil nil nil] nil nil]) (it . [cl-struct-deferred (closure ((callback closure (#2 t) nil (setq jedi:get-in-function-call--d nil)) (callback closure (#2 t) nil (setq jedi:get-in-function-call--d nil)) (d . [cl-struct-deferred jedi:get-in-function-call--tooltip-show deferred:default-errorback deferred:default-cancel #3 nil nil]) cl-struct-deferred-tags t) (x) (condition-case nil (progn (deferred:call-lambda callback x)) (error nil)) x) (closure ((normal closure (... ... ... cl-struct-deferred-tags t) (x) (condition-case nil ... ...) x) (callback closure (#2 t) nil (setq jedi:get-in-function-call--d nil)) (callback closure (#2 t) nil (setq jedi:get-in-function-call--d nil)) (d . [cl-struct-deferred jedi:get-in-function-call--tooltip-show deferred:default-errorback deferred:default-cancel #3 nil nil]) cl-struct-deferred-tags t) (e) (condition-case nil (progn (deferred:call-lambda callback e)) (error nil)) (deferred:resignal e)) deferred:default-cancel nil nil nil]) t) nil (if jedi-mode (progn (deferred:earlier (deferred:nextc (deferred:wait jedi:get-in-function-call-timeout) (function (lambda (x) nil))) (jedi:call-deferred (quote get_in_function_call)))))) 1002.1636486053467)
  (let ((value (deferred:call-lambda callback arg))) (cond ((progn nil (and (vectorp value) (>= (length value) 7) (memq (aref value 0) cl-struct-deferred-tags) t)) (progn (save-current-buffer (set-buffer (get-buffer-create "*deferred:debug*")) (save-excursion (goto-char (point-max)) (insert (format "%5i %s\n" deferred:debug-count ...)))) (setq deferred:debug-count (1+ deferred:debug-count))) (if next-deferred (deferred:set-next value next-deferred) value)) (t (if next-deferred (deferred:post-task next-deferred (quote ok) value) (progn nil (or (progn nil (and ... ... ... t)) (signal (quote wrong-type-argument) (list ... d))) (let* ((v d)) (aset v 5 (quote ok)))) (progn nil (or (progn nil (and ... ... ... t)) (signal (quote wrong-type-argument) (list ... d))) (let* ((v d)) (aset v 6 value))) value))))
  (condition-case err (let ((value (deferred:call-lambda callback arg))) (cond ((progn nil (and (vectorp value) (>= (length value) 7) (memq (aref value 0) cl-struct-deferred-tags) t)) (progn (save-current-buffer (set-buffer (get-buffer-create "*deferred:debug*")) (save-excursion (goto-char ...) (insert ...))) (setq deferred:debug-count (1+ deferred:debug-count))) (if next-deferred (deferred:set-next value next-deferred) value)) (t (if next-deferred (deferred:post-task next-deferred (quote ok) value) (progn nil (or (progn nil ...) (signal ... ...)) (let* (...) (aset v 5 ...))) (progn nil (or (progn nil ...) (signal ... ...)) (let* (...) (aset v 6 value))) value)))) (error (cond (next-deferred (deferred:post-task next-deferred (quote ng) err)) (deferred:onerror (deferred:call-lambda deferred:onerror err)) (t (progn (save-current-buffer (set-buffer (get-buffer-create "*deferred:debug*")) (save-excursion (goto-char ...) (insert ...))) (setq deferred:debug-count (1+ deferred:debug-count))) (message "deferred error : %S" err) (progn nil (or (progn nil (and ... ... ... t)) (signal (quote wrong-type-argument) (list ... d))) (let* ((v d)) (aset v 5 (quote ng)))) (progn nil (or (progn nil (and ... ... ... t)) (signal (quote wrong-type-argument) (list ... d))) (let* ((v d)) (aset v 6 err))) err))))
  (let ((debug-on-signal (or debug-on-signal deferred:debug-on-signal))) (condition-case err (let ((value (deferred:call-lambda callback arg))) (cond ((progn nil (and (vectorp value) (>= ... 7) (memq ... cl-struct-deferred-tags) t)) (progn (save-current-buffer (set-buffer ...) (save-excursion ... ...)) (setq deferred:debug-count (1+ deferred:debug-count))) (if next-deferred (deferred:set-next value next-deferred) value)) (t (if next-deferred (deferred:post-task next-deferred (quote ok) value) (progn nil (or ... ...) (let* ... ...)) (progn nil (or ... ...) (let* ... ...)) value)))) (error (cond (next-deferred (deferred:post-task next-deferred (quote ng) err)) (deferred:onerror (deferred:call-lambda deferred:onerror err)) (t (progn (save-current-buffer (set-buffer ...) (save-excursion ... ...)) (setq deferred:debug-count (1+ deferred:debug-count))) (message "deferred error : %S" err) (progn nil (or (progn nil ...) (signal ... ...)) (let* (...) (aset v 5 ...))) (progn nil (or (progn nil ...) (signal ... ...)) (let* (...) (aset v 6 err))) err)))))
  (cond (callback (let ((debug-on-signal (or debug-on-signal deferred:debug-on-signal))) (condition-case err (let ((value (deferred:call-lambda callback arg))) (cond ((progn nil ...) (progn ... ...) (if next-deferred ... value)) (t (if next-deferred ... ... ... value)))) (error (cond (next-deferred (deferred:post-task next-deferred ... err)) (deferred:onerror (deferred:call-lambda deferred:onerror err)) (t (progn ... ...) (message "deferred error : %S" err) (progn nil ... ...) (progn nil ... ...) err)))))) (t (cond (next-deferred (deferred:exec-task next-deferred which arg)) ((eq which (quote ok)) arg) (t (deferred:resignal arg)))))
  (let ((callback (if (eq which (quote ok)) (progn nil (or (progn nil (and ... ... ... t)) (signal (quote wrong-type-argument) (list ... d))) (aref d 1)) (progn nil (or (progn nil (and ... ... ... t)) (signal (quote wrong-type-argument) (list ... d))) (aref d 2)))) (next-deferred (progn nil (or (progn nil (and (vectorp d) (>= ... 7) (memq ... cl-struct-deferred-tags) t)) (signal (quote wrong-type-argument) (list (quote deferred) d))) (aref d 4)))) (cond (callback (let ((debug-on-signal (or debug-on-signal deferred:debug-on-signal))) (condition-case err (let ((value ...)) (cond (... ... ...) (t ...))) (error (cond (next-deferred ...) (deferred:onerror ...) (t ... ... ... ... err)))))) (t (cond (next-deferred (deferred:exec-task next-deferred which arg)) ((eq which (quote ok)) arg) (t (deferred:resignal arg))))))
  deferred:exec-task([cl-struct-deferred (closure ((it . [cl-struct-deferred jedi:get-in-function-call--tooltip-show deferred:default-errorback deferred:default-cancel [cl-struct-deferred (closure (... ... ... cl-struct-deferred-tags t) (x) (condition-case nil ... ...) x) (closure (... ... ... ... cl-struct-deferred-tags t) (e) (condition-case nil ... ...) (deferred:resignal e)) deferred:default-cancel nil nil nil] nil nil]) (it . [cl-struct-deferred (closure ((callback closure ... nil ...) (callback closure ... nil ...) (d . [cl-struct-deferred jedi:get-in-function-call--tooltip-show deferred:default-errorback deferred:default-cancel #4 nil nil]) cl-struct-deferred-tags t) (x) (condition-case nil (progn ...) (error nil)) x) (closure ((normal closure ... ... ... x) (callback closure ... nil ...) (callback closure ... nil ...) (d . [cl-struct-deferred jedi:get-in-function-call--tooltip-show deferred:default-errorback deferred:default-cancel #4 nil nil]) cl-struct-deferred-tags t) (e) (condition-case nil (progn ...) (error nil)) (deferred:resignal e)) deferred:default-cancel nil nil nil]) t) nil (if jedi-mode (progn (deferred:earlier (deferred:nextc (deferred:wait jedi:get-in-function-call-timeout) (function (lambda ... nil))) (jedi:call-deferred (quote get_in_function_call)))))) deferred:default-errorback deferred:default-cancel [cl-struct-deferred jedi:get-in-function-call--tooltip-show deferred:default-errorback deferred:default-cancel [cl-struct-deferred (closure ((callback closure ((it . #2) t) nil (setq jedi:get-in-function-call--d nil)) (callback closure ((it . #2) t) nil (setq jedi:get-in-function-call--d nil)) (d . #1) cl-struct-deferred-tags t) (x) (condition-case nil (progn (deferred:call-lambda callback x)) (error nil)) x) (closure ((normal closure ((callback closure ... nil ...) (callback closure ... nil ...) (d . #1) cl-struct-deferred-tags t) (x) (condition-case nil (progn ...) (error nil)) x) (callback closure ((it . #2) t) nil (setq jedi:get-in-function-call--d nil)) (callback closure ((it . #2) t) nil (setq jedi:get-in-function-call--d nil)) (d . #1) cl-struct-deferred-tags t) (e) (condition-case nil (progn (deferred:call-lambda callback e)) (error nil)) (deferred:resignal e)) deferred:default-cancel nil nil nil] nil nil] nil nil] ok 1002.1636486053467)
  (setq value (deferred:exec-task d which arg))
  (condition-case err (setq value (deferred:exec-task d which arg)) (error (progn (save-current-buffer (set-buffer (get-buffer-create "*deferred:debug*")) (save-excursion (goto-char (point-max)) (insert (format "%5i %s\n" deferred:debug-count (format "ERROR : %s" err))))) (setq deferred:debug-count (1+ deferred:debug-count))) (message "deferred error : %s" err)))
  (let* ((pack (car (last deferred:queue))) (d (car pack)) (which (car (cdr pack))) (arg (cdr (cdr pack))) value) (setq deferred:queue (nbutlast deferred:queue)) (condition-case err (setq value (deferred:exec-task d which arg)) (error (progn (save-current-buffer (set-buffer (get-buffer-create "*deferred:debug*")) (save-excursion (goto-char (point-max)) (insert (format "%5i %s\n" deferred:debug-count ...)))) (setq deferred:debug-count (1+ deferred:debug-count))) (message "deferred error : %s" err))) value)
  (progn (let* ((pack (car (last deferred:queue))) (d (car pack)) (which (car (cdr pack))) (arg (cdr (cdr pack))) value) (setq deferred:queue (nbutlast deferred:queue)) (condition-case err (setq value (deferred:exec-task d which arg)) (error (progn (save-current-buffer (set-buffer (get-buffer-create "*deferred:debug*")) (save-excursion (goto-char ...) (insert ...))) (setq deferred:debug-count (1+ deferred:debug-count))) (message "deferred error : %s" err))) value))
  (if deferred:queue (progn (let* ((pack (car (last deferred:queue))) (d (car pack)) (which (car (cdr pack))) (arg (cdr (cdr pack))) value) (setq deferred:queue (nbutlast deferred:queue)) (condition-case err (setq value (deferred:exec-task d which arg)) (error (progn (save-current-buffer (set-buffer ...) (save-excursion ... ...)) (setq deferred:debug-count (1+ deferred:debug-count))) (message "deferred error : %s" err))) value)))
  deferred:worker()
  apply(deferred:worker nil)
  timer-event-handler([t 23076 63495 368046 nil deferred:worker nil nil 155000])
immerrr commented 6 years ago

Hi, I've recently picked up maintainership over emacs-jedi and am trying to clean up the backlog.

Is this issue still relevant? Can you try to reproduce it on current master?