astoff / devdocs.el

Emacs viewer for DevDocs
297 stars 17 forks source link

Error on devdocs-lookup command #22

Closed jumper047 closed 1 year ago

jumper047 commented 2 years ago

Installed package, installed doc via devdoc-install, and after evaluating devdoc-lookup got this error:

Debugger entered--Lisp error: (wrong-type-argument listp ((doc (name . "Python") (slug . "python~3.9") (type . "python") (links (home . "https://www.python.org/") (code . "https://github.com/python/cpython")) (version . "3.9") (release . "3.9.4") (mtime . 1619733948) (db_size . 9258427)) . \.\.\.))
  alist-get(name ((doc (name . "Python") (slug . "python~3.9") (type . "python") (links (home . "https://www.python.org/") (code . "https://github.com/python/cpython")) (version . "3.9") (release . "3.9.4") (mtime . 1619733948) (db_size . 9258427)) . \.\.\.))
  (let* ((name (alist-get 'name it)) (count (1+ (gethash name counts 0)))) (puthash name count counts) (cons name (cons count it)))
  (closure ((counts . #<hash-table equal 10/65 0x1566f92d942f>) (documents ((name . "Python") (slug . "python~3.9") (type . "python") (links (home . "https://www.python.org/") (code . "https://github.com/python/cpython")) (version . "3.9") (release . "3.9.4") (mtime . 1619733948) (db_size . 9258427))) devdocs-mode-abbrev-table devdocs-mode-syntax-table t) (it) (let* ((name (alist-get 'name it)) (count (1+ (gethash name counts 0)))) (puthash name count counts) (cons name (cons count it))))(((doc (name . "Python") (slug . "python~3.9") (type . "python") (links (home . "https://www.python.org/") (code . "https://github.com/python/cpython")) (version . "3.9") (release . "3.9.4") (mtime . 1619733948) (db_size . 9258427)) . \.\.\.))
  mapcar((closure ((counts . #<hash-table equal 10/65 0x1566f92d942f>) (documents ((name . "Python") (slug . "python~3.9") (type . "python") (links (home . "https://www.python.org/") (code . "https://github.com/python/cpython")) (version . "3.9") (release . "3.9.4") (mtime . 1619733948) (db_size . 9258427))) devdocs-mode-abbrev-table devdocs-mode-syntax-table t) (it) (let* ((name (alist-get 'name it)) (count (1+ (gethash name counts 0)))) (puthash name count counts) (cons name (cons count it)))) [((doc (name . "Python") (slug . "python~3.9") (type . "python") (links (home . "https://www.python.org/") (code . "https://github.com/python/cpython")) (version . "3.9") (release . "3.9.4") (mtime . 1619733948) (db_size . 9258427)) (name . "abc") (path . "library/abc") (type . "Runtime")) ((doc (name . "Python") (slug . "python~3.9") (type . "python") (links (home . "https://www.python.org/") (code . "https://github.com/python/cpython")) (version . "3.9") (release . "3.9.4") (mtime . 1619733948) (db_size . 9258427)) (name . "abc.ABC") (path . "library/abc#abc.ABC") (type . "Runtime")) ((doc (name . "Python") (slug . "python~3.9") (type . "python") (links (home . "https://www.python.org/") (code . "https://github.com/python/cpython")) (version . "3.9") (release . "3.9.4") (mtime . 1619733948) (db_size . 9258427)) (name . "abc.ABCMeta") (path . "library/abc#abc.ABCMeta") (type . "Runtime")) ((doc (name . "Python") (slug . "python~3.9") (type . "python") (links (home . "https://www.python.org/") (code . "https://github.com/python/cpython")) (version . "3.9") (release . "3.9.4") (mtime . 1619733948) (db_size . 9258427)) (name . "abc.ABCMeta.register()") (path . "library/abc#abc.ABCMeta.register") (type . "Runtime")) ((doc (name . "Python") (slug . "python~3.9") (type . "python") (links (home . "https://www.python.org/") (code . "https://github.com/python/cpython")) (version . "3.9") (release . "3.9.4") (mtime . 1619733948) (db_size . 9258427)) (name . "abc.ABCMeta.__subclasshook__()") (path . "library/abc#abc.ABCMeta.__subclasshook__") (type . "Runtime")) ((doc (name . "Python") (slug . "python~3.9") (type . "python") (links (home . "https://www.python.org/") (code . "https://github.com/python/cpython")) (version . "3.9") (release . "3.9.4") (mtime . 1619733948) (db_size . 9258427)) (name . "abc.abstractclassmethod()") (path . "library/abc#abc.abstractclassmethod") (type . "Runtime")) ((doc (name . "Python") (slug . "python~3.9") (type . "python") (links (home . "https://www.python.org/") (code . "https://github.com/python/cpython")) (version . "3.9") (release . "3.9.4") (mtime . 1619733948) (db_size . 9258427)) (name . "abc.abstractmethod()") (path . "library/abc#abc.abstractmethod") (type . "Runtime")) ((doc (name . "Python") (slug . "python~3.9") (type . "python") (links (home . "https://www.python.org/") (code . "https://github.com/python/cpython")) (version . "3.9") (release . "3.9.4") (mtime . 1619733948) (db_size . 9258427)) (name . "abc.abstractproperty()") (path . "library/abc#abc.abstractproperty") (type . "Runtime")) ((doc (name . "Python") (slug . "python~3.9") (type . "python") (links (home . "https://www.python.org/") (code . "https://github.com/python/cpython")) (version . "3.9") (release . "3.9.4") (mtime . 1619733948) (db_size . 9258427)) (name . "abc.abstractstaticmethod()") (path . "library/abc#abc.abstractstaticmethod") (type . "Runtime")) ((doc (name . "Python") (slug . "python~3.9") (type . "python") (links (home . "https://www.python.org/") (code . "https://github.com/python/cpython")) (version . "3.9") (release . "3.9.4") (mtime . 1619733948) (db_size . 9258427)) (name . "abc.get_cache_token()") (path . "library/abc#abc.get_cache_token") (type . "Runtime")) ((doc (name . "Python") (slug . "python~3.9") (type . "python") (links (home . "https://www.python.org/") (code . "https://github.com/python/cpython")) (version . "3.9") (release . "3.9.4") (mtime . 1619733948) (db_size . 9258427)) . \.\.\.)])
  (closure ((mkentry closure ((counts . #<hash-table equal 10/65 0x1566f92d942f>) (documents ((name . "Python") (slug . "python~3.9") (type . "python") (links ... ...) (version . "3.9") (release . "3.9.4") (mtime . 1619733948) (db_size . 9258427))) devdocs-mode-abbrev-table devdocs-mode-syntax-table t) (it) (let* ((name (alist-get ... it)) (count (1+ ...))) (puthash name count counts) (cons name (cons count it)))) (counts . #<hash-table equal 10/65 0x1566f92d942f>) (documents ((name . "Python") (slug . "python~3.9") (type . "python") (links (home . "https://www.python.org/") (code . "https://github.com/python/cpython")) (version . "3.9") (release . "3.9.4") (mtime . 1619733948) (db_size . 9258427))) devdocs-mode-abbrev-table devdocs-mode-syntax-table t) (doc) (mapcar mkentry (devdocs--index doc 'entries)))(((name . "Python") (slug . "python~3.9") (type . "python") (links (home . "https://www.python.org/") (code . "https://github.com/python/cpython")) (version . "3.9") (release . "3.9.4") (mtime . 1619733948) (db_size . 9258427)))
  mapcan((closure ((mkentry closure ((counts . #<hash-table equal 10/65 0x1566f92d942f>) (documents ((name . "Python") (slug . "python~3.9") (type . "python") (links ... ...) (version . "3.9") (release . "3.9.4") (mtime . 1619733948) (db_size . 9258427))) devdocs-mode-abbrev-table devdocs-mode-syntax-table t) (it) (let* ((name (alist-get ... it)) (count (1+ ...))) (puthash name count counts) (cons name (cons count it)))) (counts . #<hash-table equal 10/65 0x1566f92d942f>) (documents ((name . "Python") (slug . "python~3.9") (type . "python") (links (home . "https://www.python.org/") (code . "https://github.com/python/cpython")) (version . "3.9") (release . "3.9.4") (mtime . 1619733948) (db_size . 9258427))) devdocs-mode-abbrev-table devdocs-mode-syntax-table t) (doc) (mapcar mkentry (devdocs--index doc 'entries))) (((name . "Python") (slug . "python~3.9") (type . "python") (links (home . "https://www.python.org/") (code . "https://github.com/python/cpython")) (version . "3.9") (release . "3.9.4") (mtime . 1619733948) (db_size . 9258427))))
  (let* ((counts (make-hash-table :test 'equal)) (mkentry #'(lambda (it) (let* ((name ...) (count ...)) (puthash name count counts) (cons name (cons count it))))) (entries (mapcan #'(lambda (doc) (mapcar mkentry (devdocs--index doc ...))) documents))) (mapcar #'(lambda (arg0) (progn (ignore (consp arg0)) (let* ((x2 ...) (x3 ...)) (progn (ignore ...) (let* ... ...))))) entries))
  devdocs--entries((((name . "Python") (slug . "python~3.9") (type . "python") (links (home . "https://www.python.org/") (code . "https://github.com/python/cpython")) (version . "3.9") (release . "3.9.4") (mtime . 1619733948) (db_size . 9258427))))
  (closure ((initial-input) (documents ((name . "Python") (slug . "python~3.9") (type . "python") (links (home . "https://www.python.org/") (code . "https://github.com/python/cpython")) (version . "3.9") (release . "3.9.4") (mtime . 1619733948) (db_size . 9258427))) (prompt . "Go to documentation: ") devdocs-mode-abbrev-table devdocs-mode-syntax-table t) nil (devdocs--entries documents))()
  funcall((closure ((initial-input) (documents ((name . "Python") (slug . "python~3.9") (type . "python") (links (home . "https://www.python.org/") (code . "https://github.com/python/cpython")) (version . "3.9") (release . "3.9.4") (mtime . 1619733948) (db_size . 9258427))) (prompt . "Go to documentation: ") devdocs-mode-abbrev-table devdocs-mode-syntax-table t) nil (devdocs--entries documents)))
  (let ((val (funcall fun)) (timer (run-at-time devdocs-cache-timeout nil #'remhash funrep devdocs--cache))) (prog1 val (puthash funrep (cons timer val) devdocs--cache)))
  (if data (prog1 (cdr data) (timer-set-time (car data) (time-add nil devdocs-cache-timeout))) (let ((val (funcall fun)) (timer (run-at-time devdocs-cache-timeout nil #'remhash funrep devdocs--cache))) (prog1 val (puthash funrep (cons timer val) devdocs--cache))))
  (let* ((fun (and t #'(lambda nil (devdocs--entries documents)))) (funrep (and fun fun)) (data (and funrep (gethash funrep devdocs--cache)))) (if data (prog1 (cdr data) (timer-set-time (car data) (time-add nil devdocs-cache-timeout))) (let ((val (funcall fun)) (timer (run-at-time devdocs-cache-timeout nil #'remhash funrep devdocs--cache))) (prog1 val (puthash funrep (cons timer val) devdocs--cache)))))
  (let* ((cands (let* ((fun (and t #'...)) (funrep (and fun fun)) (data (and funrep (gethash funrep devdocs--cache)))) (if data (prog1 (cdr data) (timer-set-time (car data) (time-add nil devdocs-cache-timeout))) (let ((val ...) (timer ...)) (prog1 val (puthash funrep ... devdocs--cache)))))) (metadata '(metadata (category . devdocs) (annotation-function . devdocs--annotate))) (coll #'(lambda (string predicate action) (if (eq action 'metadata) metadata (complete-with-action action cands string predicate)))) (cand (completing-read prompt coll nil t initial-input 'devdocs-history (thing-at-point 'symbol)))) (devdocs--get-data (car (member cand cands))))
  devdocs--read-entry("Go to documentation: " (((name . "Python") (slug . "python~3.9") (type . "python") (links (home . "https://www.python.org/") (code . "https://github.com/python/cpython")) (version . "3.9") (release . "3.9.4") (mtime . 1619733948) (db_size . 9258427))) nil)
  (let* ((entry (devdocs--read-entry "Go to documentation: " (devdocs--relevant-docs ask-docs) initial-input)) (buffer (devdocs--render entry))) (let ((save-selected-window--state (internal--before-with-selected-window (display-buffer buffer)))) (save-current-buffer (unwind-protect (progn (select-window (car save-selected-window--state) 'norecord) (devdocs-goto-target) (recenter 0)) (internal--after-with-selected-window save-selected-window--state)))))
  devdocs-lookup(nil)
  funcall-interactively(devdocs-lookup nil)
  call-interactively(devdocs-lookup record nil)
  command-execute(devdocs-lookup record)
  counsel-M-x-action("devdocs-lookup")
  #f(compiled-function (x) #<bytecode -0x18ee06ae4a7fa6c0>)("devdocs-lookup")
  ivy-call()
  #<subr ivy-read>("M-x " [org-noter--view-info table--measure-max-width vc-src-responsible-p eshell-insert-buffer-name eldoc-box--update-childframe-geometry tramp-completion-handle-file-name-all-completions jsonrpc-name company-posframe-quickhelp-show-header mc/prompt-for-inclusion-in-whitelist sp--looking-at ert-test-passed-duration--cmacro c-electric-lt-gt start-char virtual-comment-get-evc-file gnus-article-nndoc-name :render flycheck-mode-line-prefix cl-struct-flycheck-syntax-check-tags speedbar-file-regexp racket-insert-closing-bracket mc/for-each-fake-cursor lsp-perlnavigator eshell-return-exits-minibuffer :EndLineNumber treemacs--button-symbol-switch nnoo-map-functions flycheck-coffee-coffeelint-executable compilation-error-list kmacro-pop-ring1 request-response-p--cmacro :odt-styles-file flycheck-pug-executable passed-expected xref--push-markers vc-bzr-shelve-menu rng-match-infer-start-tag-namespace Above nnimap-status-message int-file-name lsp--virtual-buffer nnmail-message-id-cache-file treemacs-python-executable highlight-indent-guides--idle-timer projectile-unserialize zoo diredfl-symlink core-accessing-symbol tsc-node-named-p sp-ignore-modes-list flycheck-puppet-lint-disabled-arg-name ...] :predicate #f(compiled-function (sym) #<bytecode 0xfb033a79107020e>) :require-match t :history counsel-M-x-history :action counsel-M-x-action :keymap (keymap (67108908 . counsel--info-lookup-symbol) (67108910 . counsel-find-symbol)) :initial-input nil :caller counsel-M-x :sort t)
  apply(#<subr ivy-read> ("M-x " [org-noter--view-info table--measure-max-width vc-src-responsible-p eshell-insert-buffer-name eldoc-box--update-childframe-geometry tramp-completion-handle-file-name-all-completions jsonrpc-name company-posframe-quickhelp-show-header mc/prompt-for-inclusion-in-whitelist sp--looking-at ert-test-passed-duration--cmacro c-electric-lt-gt start-char virtual-comment-get-evc-file gnus-article-nndoc-name :render flycheck-mode-line-prefix cl-struct-flycheck-syntax-check-tags speedbar-file-regexp racket-insert-closing-bracket mc/for-each-fake-cursor lsp-perlnavigator eshell-return-exits-minibuffer :EndLineNumber treemacs--button-symbol-switch nnoo-map-functions flycheck-coffee-coffeelint-executable compilation-error-list kmacro-pop-ring1 request-response-p--cmacro :odt-styles-file flycheck-pug-executable passed-expected xref--push-markers vc-bzr-shelve-menu rng-match-infer-start-tag-namespace Above nnimap-status-message int-file-name lsp--virtual-buffer nnmail-message-id-cache-file treemacs-python-executable highlight-indent-guides--idle-timer projectile-unserialize zoo diredfl-symlink core-accessing-symbol tsc-node-named-p sp-ignore-modes-list flycheck-puppet-lint-disabled-arg-name ...] :predicate #f(compiled-function (sym) #<bytecode 0xfb033a79107020e>) :require-match t :history counsel-M-x-history :action counsel-M-x-action :keymap (keymap (67108908 . counsel--info-lookup-symbol) (67108910 . counsel-find-symbol)) :initial-input nil :caller counsel-M-x :sort t))
  ivy-read("M-x " [org-noter--view-info table--measure-max-width vc-src-responsible-p eshell-insert-buffer-name eldoc-box--update-childframe-geometry tramp-completion-handle-file-name-all-completions jsonrpc-name company-posframe-quickhelp-show-header mc/prompt-for-inclusion-in-whitelist sp--looking-at ert-test-passed-duration--cmacro c-electric-lt-gt start-char virtual-comment-get-evc-file gnus-article-nndoc-name :render flycheck-mode-line-prefix cl-struct-flycheck-syntax-check-tags speedbar-file-regexp racket-insert-closing-bracket mc/for-each-fake-cursor lsp-perlnavigator eshell-return-exits-minibuffer :EndLineNumber treemacs--button-symbol-switch nnoo-map-functions flycheck-coffee-coffeelint-executable compilation-error-list kmacro-pop-ring1 request-response-p--cmacro :odt-styles-file flycheck-pug-executable passed-expected xref--push-markers vc-bzr-shelve-menu rng-match-infer-start-tag-namespace Above nnimap-status-message int-file-name lsp--virtual-buffer nnmail-message-id-cache-file treemacs-python-executable highlight-indent-guides--idle-timer projectile-unserialize zoo diredfl-symlink core-accessing-symbol tsc-node-named-p sp-ignore-modes-list flycheck-puppet-lint-disabled-arg-name ...] :predicate #f(compiled-function (sym) #<bytecode 0xfb033a79107020e>) :require-match t :history counsel-M-x-history :action counsel-M-x-action :keymap (keymap (67108908 . counsel--info-lookup-symbol) (67108910 . counsel-find-symbol)) :initial-input nil :caller counsel-M-x)
  counsel-M-x()
  funcall-interactively(counsel-M-x)
  call-interactively(counsel-M-x nil nil)
  command-execute(counsel-M-x)
jumper047 commented 1 year ago

Sorry, seems like something was wrong on my side (not sure what exactly), returned to this package later and voila - all works as expected.