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

helm-dash-available-docsets: Wrong type argument: integer-or-marker-p, nil #132

Open
oiwn opened this issue Jun 7, 2016 · 5 comments
Open

Comments

@oiwn
Copy link

oiwn commented Jun 7, 2016

Trying to install dash docsets using helm-dash-install-docstes

got error

Contacting host: api.github.com:443
helm-dash-available-docsets: Wrong type argument: integer-or-marker-p, nil

what could be wrong?

@kidd
Copy link
Member

kidd commented Jun 8, 2016

I just tried the latest version and works fine here. Only thing that occurs to me is that you didn't have internet connection and the response is invalid.... but not sure

@elheremes
Copy link

I've got the same problem too!

@kidd
Copy link
Member

kidd commented Jan 15, 2019

can you try with toggle-edebug-on-error ?

@elheremes
Copy link

elheremes commented Jan 17, 2019

Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil)
helm-dash-read-json-from-url("https://api.github.com/repos/Kapeli/feeds/contents/")
helm-dash-official-docsets()
byte-code("\300\301\302 "C\207" [helm-dash-read-docset "Install docset" helm-dash-official-docsets] 3)
call-interactively(helm-dash-install-docset record nil)
command-execute(helm-dash-install-docset record)
execute-extended-command(nil "helm-dash-install-docset")
smex-read-and-run(("toggle-debug-on-error" "helm-dash-install-docset" "package-autoremove" "list-packages" "pyvenv-workon" "python-mode" "query-replace" "comment-region" "uncomment-region" "eshell" "eval-region" "org-latex-export-as-latex" "customize-variable" "shell" "text-mode" "replace-string" "google-this" "org-table-convert-region" "pdf-view-shrink" "irony-install-server" "helm-dash" "eval-defun" "xwidget-webkit-browse-url" "helm-dash-install-user-docset" "count-matches" "google-this-search" "package-install" "TeX-mode" "org-mode" "count-lines-page" "org-md-export-as-markdown" "pdf-view-fit-width-to-window" "revert-buffer" "pdf-tools-install" "recover-this-file" "all-the-icons-install-fonts" "pdf-view-fit-page-to-window" "tramp-cleanup-all-connections" "org-trello-install-key-and-token" "org-trello-install-board-metadata" "neotree" "shell-pop" "comment-box" "elpy-enable" "view-buffer" "doc-view-mode" "pdf-view-mode" "package-delete" "google-this-word" "toggle-word-wrap" ...))
smex()
funcall-interactively(smex)
call-interactively(smex nil nil)
command-execute(smex)

Here

@starenka
Copy link

starenka commented Jan 19, 2019

happens to me also w/ helm-dash-install-docset (in like 99% of cases):

Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil)
  helm-dash-read-json-from-url("https://api.github.com/repos/Kapeli/feeds/contents/")
  helm-dash-official-docsets()
  byte-code("\300\301\302 \"C\207" [helm-dash-read-docset "Install docset" helm-dash-official-docsets] 3)
  call-interactively(helm-dash-install-docset record nil)
  command-execute(helm-dash-install-docset record)
  #f(compiled-function (arg &optional command-name) "Preconfigured `helm' for Emacs commands.\nIt is `helm' replacement of regular `M-x' `execute-extended-command'.\n\nUnlike regular `M-x' emacs vanilla `execute-extended-command' command,\nthe prefix args if needed, can be passed AFTER starting `helm-M-x'.\nWhen a prefix arg is passed BEFORE starting `helm-M-x', the first `C-u'\nwhile in `helm-M-x' session will disable it.\n\nYou can get help on each command by persistent action." (interactive #f(compiled-function () #<bytecode 0x1e73b35>)) #<bytecode 0x2c5976d>)(nil #("helm-dash-install-docset" 0 24 (match-part "helm-dash-install-docset")))
  apply(#f(compiled-function (arg &optional command-name) "Preconfigured `helm' for Emacs commands.\nIt is `helm' replacement of regular `M-x' `execute-extended-command'.\n\nUnlike regular `M-x' emacs vanilla `execute-extended-command' command,\nthe prefix args if needed, can be passed AFTER starting `helm-M-x'.\nWhen a prefix arg is passed BEFORE starting `helm-M-x', the first `C-u'\nwhile in `helm-M-x' session will disable it.\n\nYou can get help on each command by persistent action." (interactive #f(compiled-function () #<bytecode 0x2352405>)) #<bytecode 0x2c5976d>) (nil #("helm-dash-install-docset" 0 24 (match-part "helm-dash-install-docset"))))
  helm-M-x(nil #("helm-dash-install-docset" 0 24 (match-part "helm-dash-install-docset")))
  funcall-interactively(helm-M-x nil #("helm-dash-install-docset" 0 24 (match-part "helm-dash-install-docset")))
  call-interactively(helm-M-x nil nil)
  command-execute(helm-M-x)
  recursive-edit()
  debug(debug)
  debug--implement-debug-on-entry(nil #("helm-dash-install-docset" 0 24 (match-part "helm-dash-install-docset")))
  apply(debug--implement-debug-on-entry (nil #("helm-dash-install-docset" 0 24 (match-part "helm-dash-install-docset"))))
* helm-M-x(nil #("helm-dash-install-docset" 0 24 (match-part "helm-dash-install-docset")))
  funcall-interactively(helm-M-x nil #("helm-dash-install-docset" 0 24 (match-part "helm-dash-install-docset")))
  call-interactively(helm-M-x nil nil)
  command-execute(helm-M-x)
starenka /tmp % wget -S https://api.github.com/repos/Kapeli/feeds/contents/
--2019-01-19 12:40:30--  https://api.github.com/repos/Kapeli/feeds/contents/
Resolving api.github.com (api.github.com)... 192.30.253.117, 192.30.253.116
Connecting to api.github.com (api.github.com)|192.30.253.117|:443... connected.
HTTP request sent, awaiting response... 
  HTTP/1.1 200 OK
  Server: GitHub.com
  Date: Sat, 19 Jan 2019 11:40:31 GMT
  Content-Type: application/json; charset=utf-8
  Content-Length: 171028
  Status: 200 OK
  X-RateLimit-Limit: 60
  X-RateLimit-Remaining: 49
  X-RateLimit-Reset: 1547900950
  Cache-Control: public, max-age=60, s-maxage=60
  Vary: Accept
  ETag: "28fd584855890e4891595bd3e2048a4d3ea810cc"
  Last-Modified: Fri, 18 Jan 2019 03:42:27 GMT
  X-GitHub-Media-Type: github.v3; format=json
  Access-Control-Expose-Headers: ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type
  Access-Control-Allow-Origin: *
  Strict-Transport-Security: max-age=31536000; includeSubdomains; preload
  X-Frame-Options: deny
  X-Content-Type-Options: nosniff
  X-XSS-Protection: 1; mode=block
  Referrer-Policy: origin-when-cross-origin, strict-origin-when-cross-origin
  Content-Security-Policy: default-src 'none'
  X-GitHub-Request-Id: BB86:3FDF:7ACE41:1390C43:5C430CAE
Length: 171028 (167K) [application/json]
Saving to: ‘index.html’

index.html                                       100%[========================================================================================================>] 167.02K   361KB/s    in 0.5s    

2019-01-19 12:40:32 (361 KB/s) - ‘index.html’ saved [171028/171028]

It seems the JSON containing list of docset is genereted via Github API, which has rate-limiting. Maybe this is the issue. Perhaps caching of this generated file would help (beyond mi lisp-fu :( )?

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

No branches or pull requests

4 participants