defunkt / gist.el

Yet another Emacs paste mode, this one for Gist.
550 stars 90 forks source link

(wrong-type-argument listp "https://developer.github.com/v3") #89

Closed incandescentman closed 8 years ago

incandescentman commented 8 years ago

None of my gist functions work. When I do gist-list, for instance, I get this:

`Debugger entered--Lisp error: (wrong-type-argument listp "https://developer.github.com/v3") signal(wrong-type-argument (listp "https://developer.github.com/v3")) byte-code("\304\305\"\211\203\306 !\203\307\n@\nA\"\202#\310\305 S#\210\311 \")\207" [req num err resp eieio-oref :num-retries zerop signal eieio-oset gh-url-run-request] 5) gh-url-set-response(nil ([object gh-api-paged-request "gh-api-paged-request" "GET" "https://api.github.com/users/incandescentman/gists" nil (("Authorization" . "token nil") ("Content-Type" . "application/json")) "null" nil 0 nil nil] [object gh-api-paged-response "gh-api-paged-response" nil nil (("X-GitHub-Request-Id" . "4A498EF2:3986:DE31B31:5783F411") ("X-XSS-Protection" . "1; mode=block") ("X-Frame-Options" . "deny") ("X-Content-Type-Options" . "nosniff") ("Strict-Transport-Security" . "max-age=31536000; includeSubdomains; preload") ("Content-Security-Policy" . "default-src 'none'") ("Access-Control-Allow-Origin" . "*") ("Access-Control-Expose-Headers" . "ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval") ("X-RateLimit-Reset" . "1468266111") ("X-RateLimit-Remaining" . "50") ("X-RateLimit-Limit" . "60") ("X-GitHub-Media-Type" . "github.v3") ("Status" . "401 Unauthorized") ("Content-Length" . "83") ("Content-Type" . "application/json; charset=utf-8") ("Date" . "Mon, 11 Jul 2016 19:31:29 GMT") ("Server" . "GitHub.com") (status-string . "Unauthorized") (status-code . "401") (status-version . "1.1")) 401 nil (closure (t) (&rest args) (apply (quote gh-object-list-read) (quote gh-gist-gist) args)) [object gh-api-paged-request "gh-api-paged-request-1" "GET" "https://api.github.com/users/incandescentman/gists" nil (("Authorization" . "token nil") ("Content-Type" . "application/json")) "null" nil 0 nil nil]]))

[(req &optional resp) "\306\307\310\311\"\310\312\"\310\313\"\310\314\"\310\315\"\211\203!\316 !\202\"\317)P\310\320\"\203\\206>\321\310\322\"!Dr\323\n\324C#q\210\325\326!\210+\202|\206g\321\310\322\"!Dr\327\n!q\210\324\330\"\210+.\331\332\310\333\"\"\210\207" [req params url url-request-extra-headers url-request-data url-request-method (("basic" url-basic-auth . 4)) high eieio-oref :method :data :headers :url :query gh-url-params-encode "" :async make-instance default-response-cls url-retrieve gh-url-set-response make-local-variable url-registered-auth-schemes url-retrieve-synchronously nil mapc #[(cb) "\302 \"\207" [resp cb gh-url-add-response-callback] 3] :install-callbacks url-privacy-level resp req-resp] 10]([object gh-api-paged-request "gh-api-paged-request" "GET" "https://api.github.com/users/incandescentman/gists" nil (("Authorization" . "token nil") ("Content-Type" . "application/json")) "null" nil 0 nil nil] [object gh-api-paged-response "gh-api-paged-response" nil nil (("X-GitHub-Request-Id" . "4A498EF2:3986:DE31B31:5783F411") ("X-XSS-Protection" . "1; mode=block") ("X-Frame-Options" . "deny") ("X-Content-Type-Options" . "nosniff") ("Strict-Transport-Security" . "max-age=31536000; includeSubdomains; preload") ("Content-Security-Policy" . "default-src 'none'") ("Access-Control-Allow-Origin" . "*") ("Access-Control-Expose-Headers" . "ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval") ("X-RateLimit-Reset" . "1468266111") ("X-RateLimit-Remaining" . "50") ("X-RateLimit-Limit" . "60") ("X-GitHub-Media-Type" . "github.v3") ("Status" . "401 Unauthorized") ("Content-Length" . "83") ("Content-Type" . "application/json; charset=utf-8") ("Date" . "Mon, 11 Jul 2016 19:31:29 GMT") ("Server" . "GitHub.com") (status-string . "Unauthorized") (status-code . "401") (status-version . "1.1")) 401 nil (closure (t) (&rest args) (apply (quote gh-object-list-read) (quote gh-gist-gist) args)) [object gh-api-paged-request "gh-api-paged-request-1" "GET" "https://api.github.com/users/incandescentman/gists" nil (("Authorization" . "token nil") ("Content-Type" . "application/json")) "null" nil 0 nil nil]])

apply(#[(req &optional resp) "\306\307\310\311\"\310\312\"\310\313\"\310\314\"\310\315\"\211\203!\316 !\202\"\317)P\310\320\"\203\\206>\321\310\322\"!Dr\323\n\324C#q\210\325\326!\210+\202|\206g\321\310\322\"!Dr\327\n!q\210\324\330\"\210+.\331\332\310\333\"\"\210\207" [req params url url-request-extra-headers url-request-data url-request-method (("basic" url-basic-auth . 4)) high eieio-oref :method :data :headers :url :query gh-url-params-encode "" :async make-instance default-response-cls url-retrieve gh-url-set-response make-local-variable url-registered-auth-schemes url-retrieve-synchronously nil mapc #[(cb) "\302 \"\207" [resp cb gh-url-add-response-callback] 3] :install-callbacks url-privacy-level resp req-resp] 10] ([object gh-api-paged-request "gh-api-paged-request" "GET" "https://api.github.com/users/incandescentman/gists" nil (("Authorization" . "token nil") ("Content-Type" . "application/json")) "null" nil 0 nil nil] [object gh-api-paged-response "gh-api-paged-response" nil nil (("X-GitHub-Request-Id" . "4A498EF2:3986:DE31B31:5783F411") ("X-XSS-Protection" . "1; mode=block") ("X-Frame-Options" . "deny") ("X-Content-Type-Options" . "nosniff") ("Strict-Transport-Security" . "max-age=31536000; includeSubdomains; preload") ("Content-Security-Policy" . "default-src 'none'") ("Access-Control-Allow-Origin" . "") ("Access-Control-Expose-Headers" . "ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval") ("X-RateLimit-Reset" . "1468266111") ("X-RateLimit-Remaining" . "50") ("X-RateLimit-Limit" . "60") ("X-GitHub-Media-Type" . "github.v3") ("Status" . "401 Unauthorized") ("Content-Length" . "83") ("Content-Type" . "application/json; charset=utf-8") ("Date" . "Mon, 11 Jul 2016 19:31:29 GMT") ("Server" . "GitHub.com") (status-string . "Unauthorized") (status-code . "401") (status-version . "1.1")) 401 nil (closure (t) (&rest args) (apply (quote gh-object-list-read) (quote gh-gist-gist) args)) [object gh-api-paged-request "gh-api-paged-request-1" "GET" "https://api.github.com/users/incandescentman/gists" nil (("Authorization" . "token nil") ("Content-Type" . "application/json")) "null" nil 0 nil nil]])) gh-url-run-request([object gh-api-paged-request "gh-api-paged-request" "GET" "https://api.github.com/users/incandescentman/gists" nil (("Authorization" . "token nil") ("Content-Type" . "application/json")) "null" nil 0 nil nil] [object gh-api-paged-response "gh-api-paged-response" nil nil (("X-GitHub-Request-Id" . "4A498EF2:3986:DE31B31:5783F411") ("X-XSS-Protection" . "1; mode=block") ("X-Frame-Options" . "deny") ("X-Content-Type-Options" . "nosniff") ("Strict-Transport-Security" . "max-age=31536000; includeSubdomains; preload") ("Content-Security-Policy" . "default-src 'none'") ("Access-Control-Allow-Origin" . "") ("Access-Control-Expose-Headers" . "ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval") ("X-RateLimit-Reset" . "1468266111") ("X-RateLimit-Remaining" . "50") ("X-RateLimit-Limit" . "60") ("X-GitHub-Media-Type" . "github.v3") ("Status" . "401 Unauthorized") ("Content-Length" . "83") ("Content-Type" . "application/json; charset=utf-8") ("Date" . "Mon, 11 Jul 2016 19:31:29 GMT") ("Server" . "GitHub.com") (status-string . "Unauthorized") (status-code . "401") (status-version . "1.1")) 401 nil (closure (t) (&rest args) (apply (quote gh-object-list-read) (quote gh-gist-gist) args)) [object gh-api-paged-request "gh-api-paged-request-1" "GET" "https://api.github.com/users/incandescentman/gists" nil (("Authorization" . "token nil") ("Content-Type" . "application/json")) "null" nil 0 nil nil]])

[(api transformer method resource &optional data params page-limit) "\306\307\"\211\310=\203\311\202 \312=\205\313\306\314\"\f

\315\316\3170\"!E1 \2057 \306 \320\"\235\20571\2112\205B\321 2\"\2113\205M\322 2\"43\205Y\323 2\"\2115\205d\324 2\"63\203p5\205\270\325\306\326\"\327\330\331 \332\306\333\"\334\f\"P\3357\3366\203\225\3376B\nB\202\226\n\340 \312=\203\244\3418!\206\262 \310=\203\261\3428!\206\262\343\3449& \":3\203\3175\204\317\327\345\346\347\3404%\202'2\203\376\327\306:\350\"\3510#;\352:;\"\210\353;\327\354\314 \3552\3566&\"\210;)\202' \203\357 1\"\210\352:\327\306:\350\"\3510#\"\202'\352:\327\306:\350\"\3510#\".\n\207" [api fmt headers cache resource method eieio-oref :data-format :form (("Content-Type" . "application/x-www-form-urlencoded")) :json (("Content-Type" . "application/json")) :cache sha1 format "%s" safe-methods pcache-has pcache-get gh-cache-outdated-p gh-cache-etag gh-auth-modify-request :auth make-instance gh-api-paged-request :method :url :base gh-api-expand-resource :query :headers "If-None-Match" :data gh-api-json-encode gh-url-form-encode "" :page-limit gh-api-response :data-received t default-response-cls :transform gh-url-run-request gh-url-add-response-callback gh-api-callback :key :revive pcache-invalidate transformer key ...] 17]([object gh-gist-api "gh-gist-api" nil [object gh-cache "gh/gh-gist-api/incandescentman" "~/.emacs.d/var/pcache/gh/gh-gist-api/incandescentman" "0.4/gh-3" #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8 data ( ...)) gh-cache-entry 1468265432.11262 300] "https://api.github.com" "github" [object gh-oauth-authenticator "auth" "incandescentman" nil] :json 1 nil] (closure (t) (&rest args) (apply (quote gh-object-list-read) (quote gh-gist-gist) args)) "GET" "/users/incandescentman/gists") apply(#[(api transformer method resource &optional data params page-limit) "\306\307\"\211\310=\203\311\202 \312=\205\313\306\314\"\f \315\316\3170\"!E1 \2057 \306 \320\"\235\20571\2112\205B\321 2\"\2113\205M\322 2\"43\205Y\323 2\"\2115\205d\324 2\"63\203p5\205\270\325\306\326\"\327\330\331 \332\306\333\"\334\f\"P\3357\3366\203\225\3376B\nB\202\226\n\340 \312=\203\244\3418!\206\262 \310=\203\261\3428!\206\262\343\3449& \":3\203\3175\204\317\327\345\346\347\3404%\202'2\203\376\327\306:\350\"\3510#;\352:;\"\210\353;\327\354\314 \3552\3566&\"\210;)\202' \203\357 1\"\210\352:\327\306:\350\"\3510#\"\202'\352:\327\306:\350\"\3510#\".\n\207" [api fmt headers cache resource method eieio-oref :data-format :form (("Content-Type" . "application/x-www-form-urlencoded")) :json (("Content-Type" . "application/json")) :cache sha1 format "%s" safe-methods pcache-has pcache-get gh-cache-outdated-p gh-cache-etag gh-auth-modify-request :auth make-instance gh-api-paged-request :method :url :base gh-api-expand-resource :query :headers "If-None-Match" :data gh-api-json-encode gh-url-form-encode "" :page-limit gh-api-response :data-received t default-response-cls :transform gh-url-run-request gh-url-add-response-callback gh-api-callback :key :revive pcache-invalidate transformer key ...] 17] ([object gh-gist-api "gh-gist-api" nil [object gh-cache "gh/gh-gist-api/incandescentman" "~/.emacs.d/var/pcache/gh/gh-gist-api/incandescentman" "0.4/gh-3" #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8 data ( ...)) gh-cache-entry 1468265432.11262 300] "https://api.github.com" "github" [object gh-oauth-authenticator "auth" "incandescentman" nil] :json 1 nil] (closure (t) (&rest args) (apply (quote gh-object-list-read) (quote gh-gist-gist) args)) "GET" "/users/incandescentman/gists")) gh-api-authenticated-request([object gh-gist-api "gh-gist-api" nil [object gh-cache "gh/gh-gist-api/incandescentman" "~/.emacs.d/var/pcache/gh/gh-gist-api/incandescentman" "0.4/gh-3" #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8 data ( ...)) gh-cache-entry 1468265432.11262 300] "https://api.github.com" "github" [object gh-oauth-authenticator "auth" "incandescentman" nil] :json 1 nil] (closure (t) (&rest args) (apply (quote gh-object-list-read) (quote gh-gist-gist) args)) "GET" "/users/incandescentman/gists")

[(api &optional username) "\302\303\304\305\"!\306\307\310 \206\311!\"$\207" [api username gh-api-authenticated-request gh-object-list-reader eieio-oref gist-cls "GET" format "/users/%s/gists" gh-api-get-username] 8]([object gh-gist-api "gh-gist-api" nil [object gh-cache "gh/gh-gist-api/incandescentman" "~/.emacs.d/var/pcache/gh/gh-gist-api/incandescentman" "0.4/gh-3" #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8 data ( ...)) gh-cache-entry 1468265432.11262 300] "https://api.github.com" "github" [object gh-oauth-authenticator "auth" "incandescentman" nil] :json 1 nil] "incandescentman")

apply(#[(api &optional username) "\302\303\304\305\"!\306\307\310 \206\311!\"$\207" [api username gh-api-authenticated-request gh-object-list-reader eieio-oref gist-cls "GET" format "/users/%s/gists" gh-api-get-username] 8] ([object gh-gist-api "gh-gist-api" nil [object gh-cache "gh/gh-gist-api/incandescentman" "~/.emacs.d/var/pcache/gh/gh-gist-api/incandescentman" "0.4/gh-3" #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8 data ( ...)) gh-cache-entry 1468265432.11262 300] "https://api.github.com" "github" [object gh-oauth-authenticator "auth" "incandescentman" nil] :json 1 nil] "incandescentman")) gh-gist-list([object gh-gist-api "gh-gist-api" nil [object gh-cache "gh/gh-gist-api/incandescentman" "~/.emacs.d/var/pcache/gh/gh-gist-api/incandescentman" "0.4/gh-3" #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8 data ( ...)) gh-cache-entry 1468265432.11262 300] "https://api.github.com" "github" [object gh-oauth-authenticator "auth" "incandescentman" nil] :json 1 nil] "incandescentman") gist-list-user(current-user nil nil) gist-list(nil) call-interactively(gist-list record nil) command-execute(gist-list record) execute-extended-command(nil "gist-list") smex-read-and-run(("package-list-packages" "package-install" "emacs-lisp-mode" "gist-buffer" "gist-buffer-to-pasteboard" "push-kill-ring-to-pasteboard" "whitespace-mode" "customize-group" "org-mode" "eval-region" "normal-mode" "eval-buffer" "rgrep" "customize-face" "load-theme" "abbrev-mode" "shell" "replace-regexp" "writeroom-mode" "auto-complete-mode" "incarnadine-cursor" "package-refresh-contents" "courier-font" "eshell" "cua-mode" "reveal-in-finder" "org-bullets-mode" "org-version" "org-mac-chrome-insert-frontmost-url" "hl-line-mode" "auto-capitalize-mode" "widen" "clone-indirect-buffer-other-window" "auto-complete" "query-replace" "locate" "visual-line-mode" "orgstruct++-mode" "menu-bar-showhide-tool-bar-menu-customize-disable" "calc" "goto-char" "text-mode" "orgstruct-mode" "revert-buffer" "org-narrow-to-subtree" "zenburn" "menu-bar-mode" "customize-mode" "scrollbar-init" "transparency-set-value" ...)) smex() call-interactively(smex nil nil) command-execute(smex)`

jabranham commented 8 years ago

I get the same error message when I try to use this package, and similar output from toggle-debug-on-error.

PS - @incandescentman you can fix the formatting by putting three backticks around that code output to make it easier to read

sigma commented 8 years ago

so the issue is due to a bug in gh.el that manifested itself as ("Authorization" . "token nil"). This was fixed in sigma/gh.el@d848a069d91c34b5824d6c84e6a995d71c1100d7