dash-docs-el / helm-dash

Browse Dash docsets inside emacs
511 stars 59 forks source link

json-read: JSON readtable error #148

Closed renatofdds closed 7 years ago

renatofdds commented 7 years ago

I'm getting this error trying to run helm-dash-install-docset:

Debugger entered--Lisp error: (json-readtable-error)
  signal(json-readtable-error nil)
  json-read()
  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)
  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)

GNU Emacs 25.1.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.22.5) of 2016-12-23

kidd commented 7 years ago

can you try to browse to https://api.github.com/repos/Kapeli/feeds/contents/ ?
It looks like there's some issue with parsing that page, but it works fine on my machine... maybe is a connectivity issue?

renatofdds commented 7 years ago

Found the culprit: GitHub rejects requests without User-Agent with:

HTTP/1.0 403 Forbidden
Cache-Control: no-cache
Connection: close
Content-Type: text/html

Request forbidden by administrative rules. Please make sure your request has a User-Agent header (http://developer.github.com/v3/#user-agent-required). Check https://developer.github.com for other possible causes.

and i was using url-privacy-level set to 'paranoid, effectively disabling the User-Agent for url-retrieve functions.

You can close this, sorry for the inconvenience.