From peter at kuchta.co.uk Thu Mar 21 21:41:35 2013 From: peter at kuchta.co.uk (Peter Kuchta) Date: Thu, 21 Mar 2013 21:41:35 +0000 Subject: [drakma-devel] Error while trying to POST some JSON data Message-ID: Hi everybody, I'm trying to POST some JSON data to a web service: (ql:quickload :st-json) (ql:quickload :cl-json) (ql:quickload :drakma) (defvar *rc* (merge-pathnames (user-homedir-pathname) ".apirc")) (defvar *user* (with-open-file (s *rc*) (st-json:read-json s))) (defvar api-url (st-json:getjso "url" *user*)) (defvar api-key (st-json:getjso "key" *user*)) (defvar api-email (st-json:getjso "email" *user*)) (setf drakma:*header-stream* *standard-output*) (defvar *req* '(("dataset" . "tigge") ("step" . "24") ("date" . "20071001") ("time" . "00") ("origin" . "all"))) (format t "json:~S~%" (json:encode-json-to-string *req*)) (defun retrieve (api request) (let* ((cookie-jar (make-instance 'drakma:cookie-jar)) (extra-headers (list (cons "From" api-email) (cons "X-API-KEY" api-key))) (url (concatenate 'string api-url api "/requests")) (stream (drakma:http-request url :additional-headers extra-headers :accept "application/json" :method :post :content-type "application/json" :external-format-out :utf-8 :external-format-in :utf-8 :redirect 100 :cookie-jar cookie-jar :content (json:encode-json-to-string request) :want-stream t))) (st-json:read-json stream))) (retrieve "/datasets/tigge" *req*) Unfortunately, I get an error, although the data seems to be encoded OK to JSON and the headers generated by drakma too, I think. Apparently something is wrong with the :content (the list of integers in the errors message is just the list of ASCII codes of the JSON encoded data). json:"{\"dataset\":\"tigge\",\"step\":\"24\",\"number\":\"all\",\"levtype\":\"sl\",\"date\":\"20071001\",\"time\":\"00\",\"origin\":\"all\",\"type\":\"pf\",\"param\":\"tp\",\"area\":\"70\\/-130\\/30\\/-60\",\"grid\":\"2\\/2\",\"target\":\"data.grib\"}" POST /v1/datasets/tigge/requests HTTP/1.1 Host: api.service.int User-Agent: Drakma/1.3.0 (SBCL 1.1.5; Darwin; 12.2.0; http://weitz.de/drakma/) Accept: application/json Connection: close From: me at gmail.com X-API-KEY: 19a0edb6d8d8dda1e6a3b21223e4f86a Content-Type: application/json Content-Length: 193 debugger invoked on a SIMPLE-TYPE-ERROR: The value of CL+SSL::THING is #(123 34 100 97 116 97 115 101 116 34 58 34 ...), which is not of type (SIMPLE-ARRAY (UNSIGNED-BYTE 8) (*)). Any idea what's wrong with this code? Many thanks in advance. Best regards, Piotr -------------- next part -------------- An HTML attachment was scrubbed... URL: From peter at kuchta.co.uk Thu Mar 21 21:54:49 2013 From: peter at kuchta.co.uk (Peter Kuchta) Date: Thu, 21 Mar 2013 21:54:49 +0000 Subject: [drakma-devel] Error while trying to POST some JSON data In-Reply-To: <514B7F4A.8090106@chatsubo.net> References: <514B7F4A.8090106@chatsubo.net> Message-ID: Kevin, Thank you very much - I was absolutely sure I was doing something wrong! Could you please show how I can roll back to cl+ssl-20130128-git ? I don't know how to do it, I'm a quicklisp newbie. Many thanks, Piotr On Thu, Mar 21, 2013 at 9:44 PM, Kevin Raison wrote: > I encountered this same error after upgrading packages via quicklisp. I > rolled back cl+ssl to version cl+ssl-20130128-git and the problem went > away. I have not had time to investigate further yet. > > -Kevin > > > On 03/21/2013 02:41 PM, Peter Kuchta wrote: > > Hi everybody, > > > > I'm trying to POST some JSON data to a web service: > > > > (ql:quickload :st-json) > > (ql:quickload :cl-json) > > (ql:quickload :drakma) > > > > (defvar *rc* (merge-pathnames (user-homedir-pathname) ".apirc")) > > > > (defvar *user* > > (with-open-file (s *rc*) > > (st-json:read-json s))) > > > > (defvar api-url (st-json:getjso "url" *user*)) > > (defvar api-key (st-json:getjso "key" *user*)) > > (defvar api-email (st-json:getjso "email" *user*)) > > > > (setf drakma:*header-stream* *standard-output*) > > > > (defvar *req* '(("dataset" . "tigge") > > ("step" . "24") > > ("date" . "20071001") > > ("time" . "00") > > ("origin" . "all"))) > > > > (format t "json:~S~%" (json:encode-json-to-string *req*)) > > > > (defun retrieve (api request) > > (let* ((cookie-jar (make-instance 'drakma:cookie-jar)) > > (extra-headers (list (cons "From" api-email) > > (cons "X-API-KEY" api-key))) > > (url (concatenate 'string api-url api "/requests")) > > (stream (drakma:http-request url > > :additional-headers extra-headers > > :accept "application/json" > > :method :post > > :content-type "application/json" > > :external-format-out :utf-8 > > :external-format-in :utf-8 > > :redirect 100 > > :cookie-jar cookie-jar > > :content (json:encode-json-to-string > request) > > :want-stream t))) > > (st-json:read-json stream))) > > > > (retrieve "/datasets/tigge" *req*) > > > > Unfortunately, I get an error, although the data seems to be encoded OK > > to JSON and the headers generated by drakma too, I think. Apparently > > something is wrong with the :content (the list of integers in the errors > > message is just the list of ASCII codes of the JSON encoded data). > > > > > > > json:"{\"dataset\":\"tigge\",\"step\":\"24\",\"number\":\"all\",\"levtype\":\"sl\",\"date\":\"20071001\",\"time\":\"00\",\"origin\":\"all\",\"type\":\"pf\",\"param\":\"tp\",\"area\":\"70\\/-130\\/30\\/-60\",\"grid\":\"2\\/2\",\"target\":\"data.grib\"}" > > > > POST /v1/datasets/tigge/requests HTTP/1.1 > > Host: api.service.int > > User-Agent: Drakma/1.3.0 (SBCL 1.1.5; Darwin; 12.2.0; > > http://weitz.de/drakma/) > > Accept: application/json > > Connection: close > > From: me at gmail.com > > X-API-KEY: 19a0edb6d8d8dda1e6a3b21223e4f86a > > Content-Type: application/json > > Content-Length: 193 > > > > > > debugger invoked on a SIMPLE-TYPE-ERROR: > > The value of CL+SSL::THING is #(123 34 100 97 116 97 115 101 116 > > 34 58 34 > > ...), which is not of type > (SIMPLE-ARRAY > > > > (UNSIGNED-BYTE 8) > > (*)). > > > > Any idea what's wrong with this code? Many thanks in advance. > > > > Best regards, > > Piotr > > > > > > _______________________________________________ > > drakma-devel mailing list > > drakma-devel at common-lisp.net > > http://lists.common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From raison at chatsubo.net Thu Mar 21 21:44:42 2013 From: raison at chatsubo.net (Kevin Raison) Date: Thu, 21 Mar 2013 14:44:42 -0700 Subject: [drakma-devel] Error while trying to POST some JSON data In-Reply-To: References: Message-ID: <514B7F4A.8090106@chatsubo.net> I encountered this same error after upgrading packages via quicklisp. I rolled back cl+ssl to version cl+ssl-20130128-git and the problem went away. I have not had time to investigate further yet. -Kevin On 03/21/2013 02:41 PM, Peter Kuchta wrote: > Hi everybody, > > I'm trying to POST some JSON data to a web service: > > (ql:quickload :st-json) > (ql:quickload :cl-json) > (ql:quickload :drakma) > > (defvar *rc* (merge-pathnames (user-homedir-pathname) ".apirc")) > > (defvar *user* > (with-open-file (s *rc*) > (st-json:read-json s))) > > (defvar api-url (st-json:getjso "url" *user*)) > (defvar api-key (st-json:getjso "key" *user*)) > (defvar api-email (st-json:getjso "email" *user*)) > > (setf drakma:*header-stream* *standard-output*) > > (defvar *req* '(("dataset" . "tigge") > ("step" . "24") > ("date" . "20071001") > ("time" . "00") > ("origin" . "all"))) > > (format t "json:~S~%" (json:encode-json-to-string *req*)) > > (defun retrieve (api request) > (let* ((cookie-jar (make-instance 'drakma:cookie-jar)) > (extra-headers (list (cons "From" api-email) > (cons "X-API-KEY" api-key))) > (url (concatenate 'string api-url api "/requests")) > (stream (drakma:http-request url > :additional-headers extra-headers > :accept "application/json" > :method :post > :content-type "application/json" > :external-format-out :utf-8 > :external-format-in :utf-8 > :redirect 100 > :cookie-jar cookie-jar > :content (json:encode-json-to-string request) > :want-stream t))) > (st-json:read-json stream))) > > (retrieve "/datasets/tigge" *req*) > > Unfortunately, I get an error, although the data seems to be encoded OK > to JSON and the headers generated by drakma too, I think. Apparently > something is wrong with the :content (the list of integers in the errors > message is just the list of ASCII codes of the JSON encoded data). > > > json:"{\"dataset\":\"tigge\",\"step\":\"24\",\"number\":\"all\",\"levtype\":\"sl\",\"date\":\"20071001\",\"time\":\"00\",\"origin\":\"all\",\"type\":\"pf\",\"param\":\"tp\",\"area\":\"70\\/-130\\/30\\/-60\",\"grid\":\"2\\/2\",\"target\":\"data.grib\"}" > > POST /v1/datasets/tigge/requests HTTP/1.1 > Host: api.service.int > User-Agent: Drakma/1.3.0 (SBCL 1.1.5; Darwin; 12.2.0; > http://weitz.de/drakma/) > Accept: application/json > Connection: close > From: me at gmail.com > X-API-KEY: 19a0edb6d8d8dda1e6a3b21223e4f86a > Content-Type: application/json > Content-Length: 193 > > > debugger invoked on a SIMPLE-TYPE-ERROR: > The value of CL+SSL::THING is #(123 34 100 97 116 97 115 101 116 > 34 58 34 > ...), which is not of type (SIMPLE-ARRAY > > (UNSIGNED-BYTE 8) > (*)). > > Any idea what's wrong with this code? Many thanks in advance. > > Best regards, > Piotr > > > _______________________________________________ > drakma-devel mailing list > drakma-devel at common-lisp.net > http://lists.common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel > From hans.huebner at gmail.com Fri Mar 22 09:05:22 2013 From: hans.huebner at gmail.com (=?ISO-8859-1?Q?Hans_H=FCbner?=) Date: Fri, 22 Mar 2013 10:05:22 +0100 Subject: [drakma-devel] Error while trying to POST some JSON data In-Reply-To: References: <514B7F4A.8090106@chatsubo.net> Message-ID: You can check out the latest cl+ssl - which contains a fix for the problem: cd ~/quicklisp/local-projects/ git clone git://gitorious.org/cl-plus-ssl/cl-plus-ssl.git Quicklisp will automatically find cl+ssl from that location. Remember to remove that checkout after you've upgraded to a newer quicklisp release that has the fix in the future. -Hans On Thu, Mar 21, 2013 at 10:54 PM, Peter Kuchta wrote: > Kevin, > > Thank you very much - I was absolutely sure I was doing something wrong! > > Could you please show how I can roll back to cl+ssl-20130128-git ? I don't > know how to do it, I'm a quicklisp newbie. > > Many thanks, > Piotr > > On Thu, Mar 21, 2013 at 9:44 PM, Kevin Raison wrote: > >> I encountered this same error after upgrading packages via quicklisp. I >> rolled back cl+ssl to version cl+ssl-20130128-git and the problem went >> away. I have not had time to investigate further yet. >> >> -Kevin >> >> >> On 03/21/2013 02:41 PM, Peter Kuchta wrote: >> > Hi everybody, >> > >> > I'm trying to POST some JSON data to a web service: >> > >> > (ql:quickload :st-json) >> > (ql:quickload :cl-json) >> > (ql:quickload :drakma) >> > >> > (defvar *rc* (merge-pathnames (user-homedir-pathname) ".apirc")) >> > >> > (defvar *user* >> > (with-open-file (s *rc*) >> > (st-json:read-json s))) >> > >> > (defvar api-url (st-json:getjso "url" *user*)) >> > (defvar api-key (st-json:getjso "key" *user*)) >> > (defvar api-email (st-json:getjso "email" *user*)) >> > >> > (setf drakma:*header-stream* *standard-output*) >> > >> > (defvar *req* '(("dataset" . "tigge") >> > ("step" . "24") >> > ("date" . "20071001") >> > ("time" . "00") >> > ("origin" . "all"))) >> > >> > (format t "json:~S~%" (json:encode-json-to-string *req*)) >> > >> > (defun retrieve (api request) >> > (let* ((cookie-jar (make-instance 'drakma:cookie-jar)) >> > (extra-headers (list (cons "From" api-email) >> > (cons "X-API-KEY" api-key))) >> > (url (concatenate 'string api-url api "/requests")) >> > (stream (drakma:http-request url >> > :additional-headers extra-headers >> > :accept "application/json" >> > :method :post >> > :content-type "application/json" >> > :external-format-out :utf-8 >> > :external-format-in :utf-8 >> > :redirect 100 >> > :cookie-jar cookie-jar >> > :content (json:encode-json-to-string >> request) >> > :want-stream t))) >> > (st-json:read-json stream))) >> > >> > (retrieve "/datasets/tigge" *req*) >> > >> > Unfortunately, I get an error, although the data seems to be encoded OK >> > to JSON and the headers generated by drakma too, I think. Apparently >> > something is wrong with the :content (the list of integers in the errors >> > message is just the list of ASCII codes of the JSON encoded data). >> > >> > >> > >> json:"{\"dataset\":\"tigge\",\"step\":\"24\",\"number\":\"all\",\"levtype\":\"sl\",\"date\":\"20071001\",\"time\":\"00\",\"origin\":\"all\",\"type\":\"pf\",\"param\":\"tp\",\"area\":\"70\\/-130\\/30\\/-60\",\"grid\":\"2\\/2\",\"target\":\"data.grib\"}" >> > >> > POST /v1/datasets/tigge/requests HTTP/1.1 >> > Host: api.service.int >> > User-Agent: Drakma/1.3.0 (SBCL 1.1.5; Darwin; 12.2.0; >> > http://weitz.de/drakma/) >> > Accept: application/json >> > Connection: close >> > From: me at gmail.com >> > X-API-KEY: 19a0edb6d8d8dda1e6a3b21223e4f86a >> > Content-Type: application/json >> > Content-Length: 193 >> > >> > >> > debugger invoked on a SIMPLE-TYPE-ERROR: >> > The value of CL+SSL::THING is #(123 34 100 97 116 97 115 101 116 >> > 34 58 34 >> > ...), which is not of type >> (SIMPLE-ARRAY >> > >> > (UNSIGNED-BYTE 8) >> > (*)). >> > >> > Any idea what's wrong with this code? Many thanks in advance. >> > >> > Best regards, >> > Piotr >> > >> > >> > _______________________________________________ >> > drakma-devel mailing list >> > drakma-devel at common-lisp.net >> > http://lists.common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel >> > >> > > > _______________________________________________ > drakma-devel mailing list > drakma-devel at common-lisp.net > http://lists.common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From peter at kuchta.co.uk Fri Mar 22 09:44:51 2013 From: peter at kuchta.co.uk (Peter Kuchta) Date: Fri, 22 Mar 2013 09:44:51 +0000 Subject: [drakma-devel] Error while trying to POST some JSON data In-Reply-To: References: <514B7F4A.8090106@chatsubo.net> Message-ID: Hans, it worked! Thank you very much indeed!!! Piotr On Fri, Mar 22, 2013 at 9:05 AM, Hans H?bner wrote: > You can check out the latest cl+ssl - which contains a fix for the problem: > > cd ~/quicklisp/local-projects/ > git clone git://gitorious.org/cl-plus-ssl/cl-plus-ssl.git > > Quicklisp will automatically find cl+ssl from that location. Remember to > remove that checkout after you've upgraded to a newer quicklisp release > that has the fix in the future. > > -Hans > > > On Thu, Mar 21, 2013 at 10:54 PM, Peter Kuchta wrote: > >> Kevin, >> >> Thank you very much - I was absolutely sure I was doing something wrong! >> >> Could you please show how I can roll back to cl+ssl-20130128-git ? I >> don't know how to do it, I'm a quicklisp newbie. >> >> Many thanks, >> Piotr >> >> On Thu, Mar 21, 2013 at 9:44 PM, Kevin Raison wrote: >> >>> I encountered this same error after upgrading packages via quicklisp. I >>> rolled back cl+ssl to version cl+ssl-20130128-git and the problem went >>> away. I have not had time to investigate further yet. >>> >>> -Kevin >>> >>> >>> On 03/21/2013 02:41 PM, Peter Kuchta wrote: >>> > Hi everybody, >>> > >>> > I'm trying to POST some JSON data to a web service: >>> > >>> > (ql:quickload :st-json) >>> > (ql:quickload :cl-json) >>> > (ql:quickload :drakma) >>> > >>> > (defvar *rc* (merge-pathnames (user-homedir-pathname) >>> ".apirc")) >>> > >>> > (defvar *user* >>> > (with-open-file (s *rc*) >>> > (st-json:read-json s))) >>> > >>> > (defvar api-url (st-json:getjso "url" *user*)) >>> > (defvar api-key (st-json:getjso "key" *user*)) >>> > (defvar api-email (st-json:getjso "email" *user*)) >>> > >>> > (setf drakma:*header-stream* *standard-output*) >>> > >>> > (defvar *req* '(("dataset" . "tigge") >>> > ("step" . "24") >>> > ("date" . "20071001") >>> > ("time" . "00") >>> > ("origin" . "all"))) >>> > >>> > (format t "json:~S~%" (json:encode-json-to-string *req*)) >>> > >>> > (defun retrieve (api request) >>> > (let* ((cookie-jar (make-instance 'drakma:cookie-jar)) >>> > (extra-headers (list (cons "From" api-email) >>> > (cons "X-API-KEY" api-key))) >>> > (url (concatenate 'string api-url api "/requests")) >>> > (stream (drakma:http-request url >>> > :additional-headers extra-headers >>> > :accept "application/json" >>> > :method :post >>> > :content-type "application/json" >>> > :external-format-out :utf-8 >>> > :external-format-in :utf-8 >>> > :redirect 100 >>> > :cookie-jar cookie-jar >>> > :content (json:encode-json-to-string >>> request) >>> > :want-stream t))) >>> > (st-json:read-json stream))) >>> > >>> > (retrieve "/datasets/tigge" *req*) >>> > >>> > Unfortunately, I get an error, although the data seems to be encoded OK >>> > to JSON and the headers generated by drakma too, I think. Apparently >>> > something is wrong with the :content (the list of integers in the >>> errors >>> > message is just the list of ASCII codes of the JSON encoded data). >>> > >>> > >>> > >>> json:"{\"dataset\":\"tigge\",\"step\":\"24\",\"number\":\"all\",\"levtype\":\"sl\",\"date\":\"20071001\",\"time\":\"00\",\"origin\":\"all\",\"type\":\"pf\",\"param\":\"tp\",\"area\":\"70\\/-130\\/30\\/-60\",\"grid\":\"2\\/2\",\"target\":\"data.grib\"}" >>> > >>> > POST /v1/datasets/tigge/requests HTTP/1.1 >>> > Host: api.service.int >>> > User-Agent: Drakma/1.3.0 (SBCL 1.1.5; Darwin; 12.2.0; >>> > http://weitz.de/drakma/) >>> > Accept: application/json >>> > Connection: close >>> > From: me at gmail.com >>> > X-API-KEY: 19a0edb6d8d8dda1e6a3b21223e4f86a >>> > Content-Type: application/json >>> > Content-Length: 193 >>> > >>> > >>> > debugger invoked on a SIMPLE-TYPE-ERROR: >>> > The value of CL+SSL::THING is #(123 34 100 97 116 97 115 101 116 >>> > 34 58 34 >>> > ...), which is not of type >>> (SIMPLE-ARRAY >>> > >>> > (UNSIGNED-BYTE 8) >>> > (*)). >>> > >>> > Any idea what's wrong with this code? Many thanks in advance. >>> > >>> > Best regards, >>> > Piotr >>> > >>> > >>> > _______________________________________________ >>> > drakma-devel mailing list >>> > drakma-devel at common-lisp.net >>> > http://lists.common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel >>> > >>> >> >> >> _______________________________________________ >> drakma-devel mailing list >> drakma-devel at common-lisp.net >> http://lists.common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel >> >> > > _______________________________________________ > drakma-devel mailing list > drakma-devel at common-lisp.net > http://lists.common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From peter at pjstirling.plus.com Fri Mar 22 12:57:15 2013 From: peter at pjstirling.plus.com (Peter Stirling) Date: Fri, 22 Mar 2013 12:57:15 +0000 Subject: [drakma-devel] Error while trying to POST some JSON data In-Reply-To: References: Message-ID: <514C552B.30409@pjstirling.plus.com> I was getting this error too, I reverted to the previous version of cl+ssl in quicklisp by putting it in the local-projects directory. I've been meaning to report another problem I've had with the new version of drakma, it seems that when I POST login details to a site that I'm using it replies with a redirect, and then drakma tries to POST the login details to the redirected page rather than accessing it with a GET. I'll try and make a test case sometime this weekend. On 21/03/13 21:41, Peter Kuchta wrote: > Hi everybody, > > I'm trying to POST some JSON data to a web service: > > (ql:quickload :st-json) > (ql:quickload :cl-json) > (ql:quickload :drakma) > > (defvar *rc* (merge-pathnames (user-homedir-pathname) ".apirc")) > > (defvar *user* > (with-open-file (s *rc*) > (st-json:read-json s))) > > (defvar api-url (st-json:getjso "url" *user*)) > (defvar api-key (st-json:getjso "key" *user*)) > (defvar api-email (st-json:getjso "email" *user*)) > > (setf drakma:*header-stream* *standard-output*) > > (defvar *req* '(("dataset" . "tigge") > ("step" . "24") > ("date" . "20071001") > ("time" . "00") > ("origin" . "all"))) > > (format t "json:~S~%" (json:encode-json-to-string *req*)) > > (defun retrieve (api request) > (let* ((cookie-jar (make-instance 'drakma:cookie-jar)) > (extra-headers (list (cons "From" api-email) > (cons "X-API-KEY" api-key))) > (url (concatenate 'string api-url api "/requests")) > (stream (drakma:http-request url > :additional-headers extra-headers > :accept "application/json" > :method :post > :content-type "application/json" > :external-format-out :utf-8 > :external-format-in :utf-8 > :redirect 100 > :cookie-jar cookie-jar > :content (json:encode-json-to-string > request) > :want-stream t))) > (st-json:read-json stream))) > > (retrieve "/datasets/tigge" *req*) > > Unfortunately, I get an error, although the data seems to be encoded > OK to JSON and the headers generated by drakma too, I think. > Apparently something is wrong with the :content (the list of integers > in the errors message is just the list of ASCII codes of the JSON > encoded data). > > json:"{\"dataset\":\"tigge\",\"step\":\"24\",\"number\":\"all\",\"levtype\":\"sl\",\"date\":\"20071001\",\"time\":\"00\",\"origin\":\"all\",\"type\":\"pf\",\"param\":\"tp\",\"area\":\"70\\/-130\\/30\\/-60\",\"grid\":\"2\\/2\",\"target\":\"data.grib\"}" > > POST /v1/datasets/tigge/requests HTTP/1.1 > Host: api.service.int > User-Agent: Drakma/1.3.0 (SBCL 1.1.5; Darwin; 12.2.0; > http://weitz.de/drakma/) > Accept: application/json > Connection: close > From: me at gmail.com > X-API-KEY: 19a0edb6d8d8dda1e6a3b21223e4f86a > Content-Type: application/json > Content-Length: 193 > > > debugger invoked on a SIMPLE-TYPE-ERROR: > The value of CL+SSL::THING is #(123 34 100 97 116 97 115 101 116 > 34 58 34 > ...), which is not of type (SIMPLE-ARRAY > (UNSIGNED-BYTE 8) > (*)). > > Any idea what's wrong with this code? Many thanks in advance. > > Best regards, > Piotr > > > _______________________________________________ > drakma-devel mailing list > drakma-devel at common-lisp.net > http://lists.common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel -------------- next part -------------- An HTML attachment was scrubbed... URL: From rm at seid-online.de Fri Mar 22 16:55:55 2013 From: rm at seid-online.de (rm at seid-online.de) Date: Fri, 22 Mar 2013 17:55:55 +0100 Subject: [drakma-devel] Error while trying to POST some JSON data In-Reply-To: <514C552B.30409@pjstirling.plus.com> References: <514C552B.30409@pjstirling.plus.com> Message-ID: <20130322165555.GA755@seid-online.de> On Fri, Mar 22, 2013 at 12:57:15PM +0000, Peter Stirling wrote: > I was getting this error too, I reverted to the previous version of cl+ssl > in quicklisp by putting it in the local-projects directory. > > I've been meaning to report another problem I've had with the new version > of drakma, it seems that when I POST login details to a site that I'm using > it replies with a redirect, How is the site redirecting? What's the HTTP status code they use? > and then drakma tries to POST the login details > to the redirected page rather than accessing it with a GET. I'll try and > make a test case sometime this weekend. Depending on the status code, that's actually valid behaviour. (see: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.2) HTH Ralf Mattes > On 21/03/13 21:41, Peter Kuchta wrote: >> Hi everybody, >> >> I'm trying to POST some JSON data to a web service: >> >> (ql:quickload :st-json) >> (ql:quickload :cl-json) >> (ql:quickload :drakma) >> >> (defvar *rc* (merge-pathnames (user-homedir-pathname) ".apirc")) >> >> (defvar *user* >> (with-open-file (s *rc*) >> (st-json:read-json s))) >> >> (defvar api-url (st-json:getjso "url" *user*)) >> (defvar api-key (st-json:getjso "key" *user*)) >> (defvar api-email (st-json:getjso "email" *user*)) >> >> (setf drakma:*header-stream* *standard-output*) >> >> (defvar *req* '(("dataset" . "tigge") >> ("step" . "24") >> ("date" . "20071001") >> ("time" . "00") >> ("origin" . "all"))) >> >> (format t "json:~S~%" (json:encode-json-to-string *req*)) >> >> (defun retrieve (api request) >> (let* ((cookie-jar (make-instance 'drakma:cookie-jar)) >> (extra-headers (list (cons "From" api-email) >> (cons "X-API-KEY" api-key))) >> (url (concatenate 'string api-url api "/requests")) >> (stream (drakma:http-request url >> :additional-headers extra-headers >> :accept "application/json" >> :method :post >> :content-type "application/json" >> :external-format-out :utf-8 >> :external-format-in :utf-8 >> :redirect 100 >> :cookie-jar cookie-jar >> :content (json:encode-json-to-string >> request) >> :want-stream t))) >> (st-json:read-json stream))) >> >> (retrieve "/datasets/tigge" *req*) >> >> Unfortunately, I get an error, although the data seems to be encoded OK to >> JSON and the headers generated by drakma too, I think. Apparently >> something is wrong with the :content (the list of integers in the errors >> message is just the list of ASCII codes of the JSON encoded data). >> >> json:"{\"dataset\":\"tigge\",\"step\":\"24\",\"number\":\"all\",\"levtype\":\"sl\",\"date\":\"20071001\",\"time\":\"00\",\"origin\":\"all\",\"type\":\"pf\",\"param\":\"tp\",\"area\":\"70\\/-130\\/30\\/-60\",\"grid\":\"2\\/2\",\"target\":\"data.grib\"}" >> >> POST /v1/datasets/tigge/requests HTTP/1.1 >> Host: api.service.int >> User-Agent: Drakma/1.3.0 (SBCL 1.1.5; Darwin; 12.2.0; >> http://weitz.de/drakma/) >> Accept: application/json >> Connection: close >> From: me at gmail.com >> X-API-KEY: 19a0edb6d8d8dda1e6a3b21223e4f86a >> Content-Type: application/json >> Content-Length: 193 >> >> >> debugger invoked on a SIMPLE-TYPE-ERROR: >> The value of CL+SSL::THING is #(123 34 100 97 116 97 115 101 116 34 >> 58 34 >> ...), which is not of type (SIMPLE-ARRAY >> (UNSIGNED-BYTE 8) >> (*)). >> >> Any idea what's wrong with this code? Many thanks in advance. >> >> Best regards, >> Piotr >> >> >> _______________________________________________ >> drakma-devel mailing list >> drakma-devel at common-lisp.net >> http://lists.common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel > > _______________________________________________ > drakma-devel mailing list > drakma-devel at common-lisp.net > http://lists.common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel From hans.huebner at gmail.com Fri Mar 22 16:21:26 2013 From: hans.huebner at gmail.com (=?ISO-8859-1?Q?Hans_H=FCbner?=) Date: Fri, 22 Mar 2013 17:21:26 +0100 Subject: [drakma-devel] Error while trying to POST some JSON data In-Reply-To: <20130322165555.GA755@seid-online.de> References: <514C552B.30409@pjstirling.plus.com> <20130322165555.GA755@seid-online.de> Message-ID: Drakma's behavior with respect to redirects has recently changed so that it is standard compliant. I would like to keep it that way, but if this is a hurdle that can't be worked around, I am open to suggestions to change it again. -Hans On Fri, Mar 22, 2013 at 5:55 PM, wrote: > On Fri, Mar 22, 2013 at 12:57:15PM +0000, Peter Stirling wrote: > > I was getting this error too, I reverted to the previous version of > cl+ssl > > in quicklisp by putting it in the local-projects directory. > > > > I've been meaning to report another problem I've had with the new version > > of drakma, it seems that when I POST login details to a site that I'm > using > > it replies with a redirect, > > How is the site redirecting? What's the HTTP status code they use? > > > and then drakma tries to POST the login details > > to the redirected page rather than accessing it with a GET. I'll try and > > make a test case sometime this weekend. > > Depending on the status code, that's actually valid behaviour. > (see: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.2) > > HTH Ralf Mattes > > > On 21/03/13 21:41, Peter Kuchta wrote: > >> Hi everybody, > >> > >> I'm trying to POST some JSON data to a web service: > >> > >> (ql:quickload :st-json) > >> (ql:quickload :cl-json) > >> (ql:quickload :drakma) > >> > >> (defvar *rc* (merge-pathnames (user-homedir-pathname) ".apirc")) > >> > >> (defvar *user* > >> (with-open-file (s *rc*) > >> (st-json:read-json s))) > >> > >> (defvar api-url (st-json:getjso "url" *user*)) > >> (defvar api-key (st-json:getjso "key" *user*)) > >> (defvar api-email (st-json:getjso "email" *user*)) > >> > >> (setf drakma:*header-stream* *standard-output*) > >> > >> (defvar *req* '(("dataset" . "tigge") > >> ("step" . "24") > >> ("date" . "20071001") > >> ("time" . "00") > >> ("origin" . "all"))) > >> > >> (format t "json:~S~%" (json:encode-json-to-string *req*)) > >> > >> (defun retrieve (api request) > >> (let* ((cookie-jar (make-instance 'drakma:cookie-jar)) > >> (extra-headers (list (cons "From" api-email) > >> (cons "X-API-KEY" api-key))) > >> (url (concatenate 'string api-url api "/requests")) > >> (stream (drakma:http-request url > >> :additional-headers extra-headers > >> :accept "application/json" > >> :method :post > >> :content-type "application/json" > >> :external-format-out :utf-8 > >> :external-format-in :utf-8 > >> :redirect 100 > >> :cookie-jar cookie-jar > >> :content (json:encode-json-to-string > >> request) > >> :want-stream t))) > >> (st-json:read-json stream))) > >> > >> (retrieve "/datasets/tigge" *req*) > >> > >> Unfortunately, I get an error, although the data seems to be encoded OK > to > >> JSON and the headers generated by drakma too, I think. Apparently > >> something is wrong with the :content (the list of integers in the errors > >> message is just the list of ASCII codes of the JSON encoded data). > >> > >> > json:"{\"dataset\":\"tigge\",\"step\":\"24\",\"number\":\"all\",\"levtype\":\"sl\",\"date\":\"20071001\",\"time\":\"00\",\"origin\":\"all\",\"type\":\"pf\",\"param\":\"tp\",\"area\":\"70\\/-130\\/30\\/-60\",\"grid\":\"2\\/2\",\"target\":\"data.grib\"}" > >> > >> POST /v1/datasets/tigge/requests HTTP/1.1 > >> Host: api.service.int > >> User-Agent: Drakma/1.3.0 (SBCL 1.1.5; Darwin; 12.2.0; > >> http://weitz.de/drakma/) > >> Accept: application/json > >> Connection: close > >> From: me at gmail.com > >> X-API-KEY: 19a0edb6d8d8dda1e6a3b21223e4f86a > >> Content-Type: application/json > >> Content-Length: 193 > >> > >> > >> debugger invoked on a SIMPLE-TYPE-ERROR: > >> The value of CL+SSL::THING is #(123 34 100 97 116 97 115 101 116 > 34 > >> 58 34 > >> ...), which is not of type > (SIMPLE-ARRAY > >> (UNSIGNED-BYTE 8) > >> (*)). > >> > >> Any idea what's wrong with this code? Many thanks in advance. > >> > >> Best regards, > >> Piotr > >> > >> > >> _______________________________________________ > >> drakma-devel mailing list > >> drakma-devel at common-lisp.net > >> http://lists.common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel > > > > > _______________________________________________ > > drakma-devel mailing list > > drakma-devel at common-lisp.net > > http://lists.common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel > > > _______________________________________________ > drakma-devel mailing list > drakma-devel at common-lisp.net > http://lists.common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: From peter at pjstirling.plus.com Sat Mar 23 05:59:17 2013 From: peter at pjstirling.plus.com (Peter Stirling) Date: Sat, 23 Mar 2013 05:59:17 +0000 Subject: [drakma-devel] Error while trying to POST some JSON data In-Reply-To: References: <514C552B.30409@pjstirling.plus.com> <20130322165555.GA755@seid-online.de> Message-ID: <514D44B5.5040501@pjstirling.plus.com> Hi, When run on drakma 1.3 the attached program signals: FORM-DATA makes only sense with POST requests. [Condition of type DRAKMA:PARAMETER-ERROR] Restarts: 0: [ABORT] Abort compilation. 1: [*ABORT] Return to SLIME's top level. 2: [ABORT] Abort thread (#) Backtrace: 0: (DRAKMA:PARAMETER-ERROR "FORM-DATA makes only sense with POST requests.") 1: (DRAKMA:HTTP-REQUEST # :METHOD :GET :REDIRECT 4 :STREAM NIL :ADDITIONAL-HEADERS NIL :PARAMETERS (("theusername" . #1="dummy") ("thepassword" . #1#)) :P.. 2: ((LABELS DRAKMA::FINISH-REQUEST :IN DRAKMA:HTTP-REQUEST) #(45 45 45 45 45 45 45 45 45 45 45 45 54 109 108 70 48 57 66 116 83 122 49 79 110 73 48 54 71 78 50 50 99 113 69 57 106 66 79 105 56 76 50 111 .. 3: (DRAKMA:HTTP-REQUEST # :COOKIE-JAR # :METHOD :POST :FORM-DATA T :PARAMETERS (("theusername" . #1="dummy") ("t.. 4: (POST-REQUEST) On drakma 1.2.9 you get the output: 127.0.0.1 - [2013-03-23 05:47:08] "POST /login.php HTTP/1.1" 302 349 "-" "Drakma/1.2.9 (SBCL 1.1.5.15-0892423; Linux; 3.5.0-26-generic; http://weitz.de/drakma/)" reply is 302 Moved Temporarily

Moved Temporarily

The document has moved here


Hunchentoot 1.2.14 (SBCL 1.1.5.15-0892423) at localhost:8181

On 22/03/13 16:21, Hans H?bner wrote: > Drakma's behavior with respect to redirects has recently changed so > that it is standard compliant. I would like to keep it that way, but > if this is a hurdle that can't be worked around, I am open to > suggestions to change it again. > > -Hans > > > On Fri, Mar 22, 2013 at 5:55 PM, > wrote: > > On Fri, Mar 22, 2013 at 12:57:15PM +0000, Peter Stirling wrote: > > I was getting this error too, I reverted to the previous version > of cl+ssl > > in quicklisp by putting it in the local-projects directory. > > > > I've been meaning to report another problem I've had with the > new version > > of drakma, it seems that when I POST login details to a site > that I'm using > > it replies with a redirect, > > How is the site redirecting? What's the HTTP status code they use? > > > and then drakma tries to POST the login details > > to the redirected page rather than accessing it with a GET. I'll > try and > > make a test case sometime this weekend. > > Depending on the status code, that's actually valid behaviour. > (see: > http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.2) > > HTH Ralf Mattes > > > On 21/03/13 21:41, Peter Kuchta wrote: > >> Hi everybody, > >> > >> I'm trying to POST some JSON data to a web service: > >> > >> (ql:quickload :st-json) > >> (ql:quickload :cl-json) > >> (ql:quickload :drakma) > >> > >> (defvar *rc* (merge-pathnames (user-homedir-pathname) > ".apirc")) > >> > >> (defvar *user* > >> (with-open-file (s *rc*) > >> (st-json:read-json s))) > >> > >> (defvar api-url (st-json:getjso "url" *user*)) > >> (defvar api-key (st-json:getjso "key" *user*)) > >> (defvar api-email (st-json:getjso "email" *user*)) > >> > >> (setf drakma:*header-stream* *standard-output*) > >> > >> (defvar *req* '(("dataset" . "tigge") > >> ("step" . "24") > >> ("date" . "20071001") > >> ("time" . "00") > >> ("origin" . "all"))) > >> > >> (format t "json:~S~%" (json:encode-json-to-string *req*)) > >> > >> (defun retrieve (api request) > >> (let* ((cookie-jar (make-instance 'drakma:cookie-jar)) > >> (extra-headers (list (cons "From" api-email) > >> (cons "X-API-KEY" api-key))) > >> (url (concatenate 'string api-url api > "/requests")) > >> (stream (drakma:http-request url > >> :additional-headers extra-headers > >> :accept "application/json" > >> :method :post > >> :content-type "application/json" > >> :external-format-out :utf-8 > >> :external-format-in :utf-8 > >> :redirect 100 > >> :cookie-jar cookie-jar > >> :content (json:encode-json-to-string > >> request) > >> :want-stream t))) > >> (st-json:read-json stream))) > >> > >> (retrieve "/datasets/tigge" *req*) > >> > >> Unfortunately, I get an error, although the data seems to be > encoded OK to > >> JSON and the headers generated by drakma too, I think. Apparently > >> something is wrong with the :content (the list of integers in > the errors > >> message is just the list of ASCII codes of the JSON encoded data). > >> > >> > json:"{\"dataset\":\"tigge\",\"step\":\"24\",\"number\":\"all\",\"levtype\":\"sl\",\"date\":\"20071001\",\"time\":\"00\",\"origin\":\"all\",\"type\":\"pf\",\"param\":\"tp\",\"area\":\"70\\/-130\\/30\\/-60\",\"grid\":\"2\\/2\",\"target\":\"data.grib\"}" > >> > >> POST /v1/datasets/tigge/requests HTTP/1.1 > >> Host: api.service.int > > >> User-Agent: Drakma/1.3.0 (SBCL 1.1.5; Darwin; 12.2.0; > >> http://weitz.de/drakma/) > >> Accept: application/json > >> Connection: close > >> From: me at gmail.com > > > >> X-API-KEY: 19a0edb6d8d8dda1e6a3b21223e4f86a > >> Content-Type: application/json > >> Content-Length: 193 > >> > >> > >> debugger invoked on a SIMPLE-TYPE-ERROR: > >> The value of CL+SSL::THING is #(123 34 100 97 116 97 115 > 101 116 34 > >> 58 34 > >> ...), which is not of type > (SIMPLE-ARRAY > >> (UNSIGNED-BYTE 8) > >> (*)). > >> > >> Any idea what's wrong with this code? Many thanks in advance. > >> > >> Best regards, > >> Piotr > >> > >> > >> _______________________________________________ > >> drakma-devel mailing list > >> drakma-devel at common-lisp.net > >> http://lists.common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel > > > > > _______________________________________________ > > drakma-devel mailing list > > drakma-devel at common-lisp.net > > http://lists.common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel > > > _______________________________________________ > drakma-devel mailing list > drakma-devel at common-lisp.net > http://lists.common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel > > > > > _______________________________________________ > drakma-devel mailing list > drakma-devel at common-lisp.net > http://lists.common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- (eval-when (:compile-toplevel :load-toplevel :execute) (ql:quickload '(#:drakma #:hunchentoot))) (defpackage #:drakma-bug (:use #:cl)) (in-package #:drakma-bug) (defvar *acceptor* (make-instance 'hunchentoot:easy-acceptor :port 8181)) (hunchentoot:start *acceptor*) (hunchentoot:define-easy-handler (login :uri "/login.php") (thepassword theusername) (declare (ignore thepassword theusername)) (hunchentoot:redirect "/cookie-check.php" :code hunchentoot:+http-moved-temporarily+)) (hunchentoot:define-easy-handler (cookie-check :uri "/cookie-check.php") () "Success") (defun post-request () (let* ((cookie-jar (make-instance 'drakma:cookie-jar)) (reply (drakma:http-request "http://localhost:8181/login.php" :cookie-jar cookie-jar :method :post :form-data t :parameters '(("theusername" . "dummy") ("thepassword" . "dummy"))))) (format t "reply is ~a~%" reply))) (post-request) From hans.huebner at gmail.com Sat Mar 23 07:07:53 2013 From: hans.huebner at gmail.com (=?ISO-8859-1?Q?Hans_H=FCbner?=) Date: Sat, 23 Mar 2013 08:07:53 +0100 Subject: [drakma-devel] Error while trying to POST some JSON data In-Reply-To: <514D44B5.5040501@pjstirling.plus.com> References: <514C552B.30409@pjstirling.plus.com> <20130322165555.GA755@seid-online.de> <514D44B5.5040501@pjstirling.plus.com> Message-ID: Peter, thanks for the bug report. I fixed the problem ( https://github.com/edicl/drakma/commit/1973b62d969b886fc536d4ebd44cfe570308c998) and released a new version of DRAKMA. -Hans On Sat, Mar 23, 2013 at 6:59 AM, Peter Stirling wrote: > Hi, > > When run on drakma 1.3 the attached program signals: > > FORM-DATA makes only sense with POST requests. > [Condition of type DRAKMA:PARAMETER-ERROR] > > Restarts: > 0: [ABORT] Abort compilation. > 1: [*ABORT] Return to SLIME's top level. > 2: [ABORT] Abort thread (#) > > Backtrace: > 0: (DRAKMA:PARAMETER-ERROR "FORM-DATA makes only sense with POST > requests.") > 1: (DRAKMA:HTTP-REQUEST # http://localhost:8181/cookie-check.php> :METHOD :GET :REDIRECT 4 :STREAM > NIL :ADDITIONAL-HEADERS NIL :PARAMETERS (("theusername" . #1="dummy") > ("thepassword" . #1#)) :P.. > 2: ((LABELS DRAKMA::FINISH-REQUEST :IN DRAKMA:HTTP-REQUEST) #(45 45 45 > 45 45 45 45 45 45 45 45 45 54 109 108 70 48 57 66 116 83 122 49 79 110 73 > 48 54 71 78 50 50 99 113 69 57 106 66 79 105 56 76 50 111 .. > 3: (DRAKMA:HTTP-REQUEST # > :COOKIE-JAR # :METHOD > :POST :FORM-DATA T :PARAMETERS (("theusername" . #1="dummy") ("t.. > 4: (POST-REQUEST) > > On drakma 1.2.9 you get the output: > > 127.0.0.1 - [2013-03-23 05:47:08] "POST /login.php HTTP/1.1" 302 349 "-" > "Drakma/1.2.9 (SBCL 1.1.5.15-0892423; Linux; 3.5.0-26-generic; > http://weitz.de/drakma/)" > reply is 302 Moved > Temporarily

Moved Temporarily

The document has > moved here


href='http://weitz.de/hunchentoot/'>Hunchentoot 1.2.14 (SBCL 1.1.5.15-0892423) at > localhost:8181

> > > > On 22/03/13 16:21, Hans H?bner wrote: > > Drakma's behavior with respect to redirects has recently changed so that > it is standard compliant. I would like to keep it that way, but if this is > a hurdle that can't be worked around, I am open to suggestions to change it > again. > > -Hans > > > On Fri, Mar 22, 2013 at 5:55 PM, wrote: > >> On Fri, Mar 22, 2013 at 12:57:15PM +0000, Peter Stirling wrote: >> > I was getting this error too, I reverted to the previous version of >> cl+ssl >> > in quicklisp by putting it in the local-projects directory. >> > >> > I've been meaning to report another problem I've had with the new >> version >> > of drakma, it seems that when I POST login details to a site that I'm >> using >> > it replies with a redirect, >> >> How is the site redirecting? What's the HTTP status code they use? >> >> > and then drakma tries to POST the login details >> > to the redirected page rather than accessing it with a GET. I'll try and >> > make a test case sometime this weekend. >> >> Depending on the status code, that's actually valid behaviour. >> (see: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.2) >> >> HTH Ralf Mattes >> >> > On 21/03/13 21:41, Peter Kuchta wrote: >> >> Hi everybody, >> >> >> >> I'm trying to POST some JSON data to a web service: >> >> >> >> (ql:quickload :st-json) >> >> (ql:quickload :cl-json) >> >> (ql:quickload :drakma) >> >> >> >> (defvar *rc* (merge-pathnames (user-homedir-pathname) >> ".apirc")) >> >> >> >> (defvar *user* >> >> (with-open-file (s *rc*) >> >> (st-json:read-json s))) >> >> >> >> (defvar api-url (st-json:getjso "url" *user*)) >> >> (defvar api-key (st-json:getjso "key" *user*)) >> >> (defvar api-email (st-json:getjso "email" *user*)) >> >> >> >> (setf drakma:*header-stream* *standard-output*) >> >> >> >> (defvar *req* '(("dataset" . "tigge") >> >> ("step" . "24") >> >> ("date" . "20071001") >> >> ("time" . "00") >> >> ("origin" . "all"))) >> >> >> >> (format t "json:~S~%" (json:encode-json-to-string *req*)) >> >> >> >> (defun retrieve (api request) >> >> (let* ((cookie-jar (make-instance 'drakma:cookie-jar)) >> >> (extra-headers (list (cons "From" api-email) >> >> (cons "X-API-KEY" api-key))) >> >> (url (concatenate 'string api-url api "/requests")) >> >> (stream (drakma:http-request url >> >> :additional-headers extra-headers >> >> :accept "application/json" >> >> :method :post >> >> :content-type "application/json" >> >> :external-format-out :utf-8 >> >> :external-format-in :utf-8 >> >> :redirect 100 >> >> :cookie-jar cookie-jar >> >> :content (json:encode-json-to-string >> >> request) >> >> :want-stream t))) >> >> (st-json:read-json stream))) >> >> >> >> (retrieve "/datasets/tigge" *req*) >> >> >> >> Unfortunately, I get an error, although the data seems to be encoded >> OK to >> >> JSON and the headers generated by drakma too, I think. Apparently >> >> something is wrong with the :content (the list of integers in the >> errors >> >> message is just the list of ASCII codes of the JSON encoded data). >> >> >> >> >> json:"{\"dataset\":\"tigge\",\"step\":\"24\",\"number\":\"all\",\"levtype\":\"sl\",\"date\":\"20071001\",\"time\":\"00\",\"origin\":\"all\",\"type\":\"pf\",\"param\":\"tp\",\"area\":\"70\\/-130\\/30\\/-60\",\"grid\":\"2\\/2\",\"target\":\"data.grib\"}" >> >> >> >> POST /v1/datasets/tigge/requests HTTP/1.1 >> >> Host: api.service.int >> >> User-Agent: Drakma/1.3.0 (SBCL 1.1.5; Darwin; 12.2.0; >> >> http://weitz.de/drakma/) >> >> Accept: application/json >> >> Connection: close >> >> From: me at gmail.com >> >> X-API-KEY: 19a0edb6d8d8dda1e6a3b21223e4f86a >> >> Content-Type: application/json >> >> Content-Length: 193 >> >> >> >> >> >> debugger invoked on a SIMPLE-TYPE-ERROR: >> >> The value of CL+SSL::THING is #(123 34 100 97 116 97 115 101 116 >> 34 >> >> 58 34 >> >> ...), which is not of type >> (SIMPLE-ARRAY >> >> (UNSIGNED-BYTE 8) >> >> (*)). >> >> >> >> Any idea what's wrong with this code? Many thanks in advance. >> >> >> >> Best regards, >> >> Piotr >> >> >> >> >> >> _______________________________________________ >> >> drakma-devel mailing list >> >> drakma-devel at common-lisp.net >> >> http://lists.common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel >> > >> >> > _______________________________________________ >> > drakma-devel mailing list >> > drakma-devel at common-lisp.net >> > http://lists.common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel >> >> >> _______________________________________________ >> drakma-devel mailing list >> drakma-devel at common-lisp.net >> http://lists.common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel >> > > > > _______________________________________________ > drakma-devel mailing listdrakma-devel at common-lisp.nethttp://lists.common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel > > > > _______________________________________________ > drakma-devel mailing list > drakma-devel at common-lisp.net > http://lists.common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From patrick.may at mac.com Sat Mar 23 14:03:38 2013 From: patrick.may at mac.com (Patrick May) Date: Sat, 23 Mar 2013 10:03:38 -0400 Subject: [drakma-devel] Problem with SBCL, Drakma, and quicklisp Message-ID: I'm trying to get Drakma working with SBCL. I've loaded it with quicklisp but when I try to connect to a website in Slime, I get this error: The function DRAKMA::WITH-CHARACTER-STREAM-SEMANTICS is undefined. [Condition of type UNDEFINED-FUNCTION] Any idea what could be causing this? I've attached the backtrace in case that helps. Thanks, Patrick Backtrace: 0: ("undefined function") 1: (HTTP-REQUEST #) 2: (GET-YAHOO-SYMBOL-DATA "IBM" "2012-01-01" "2012-12-31") 3: (SB-INT:SIMPLE-EVAL-IN-LEXENV (GET-YAHOO-SYMBOL-DATA "IBM" "2012-01-01" "2012-12-31") #) 4: (EVAL (GET-YAHOO-SYMBOL-DATA "IBM" "2012-01-01" "2012-12-31")) 5: ((LAMBDA () :IN SWANK:EVAL-AND-GRAB-OUTPUT)) 6: (SWANK::CALL-WITH-RETRY-RESTART "Retry SLIME evaluation request." #) 7: (SWANK::CALL-WITH-BUFFER-SYNTAX NIL #) 8: (SB-INT:SIMPLE-EVAL-IN-LEXENV (SWANK:EVAL-AND-GRAB-OUTPUT "(get-yahoo-symbol-data \"IBM\" \"2012-01-01\" \"2012-12-31\")\n") #) 9: (EVAL (SWANK:EVAL-AND-GRAB-OUTPUT "(get-yahoo-symbol-data \"IBM\" \"2012-01-01\" \"2012-12-31\")\n")) 10: (SWANK:EVAL-FOR-EMACS (SWANK:EVAL-AND-GRAB-OUTPUT "(get-yahoo-symbol-data \"IBM\" \"2012-01-01\" \"2012-12-31\")\n") ":comp-invest" 17) 11: (SWANK::PROCESS-REQUESTS T) 12: (SWANK::CALL-WITH-BINDINGS ..) 13: (SWANK::REPL-INPUT-STREAM-READ # #) 14: ((LAMBDA () :IN SB-GRAY:STREAM-READ-CHAR)) 15: ((SB-PCL::FAST-METHOD SB-GRAY:STREAM-READ-CHAR (SWANK-BACKEND::SLIME-INPUT-STREAM)) # # #) 16: (READ-CHAR # T #:EOF-OBJECT #) 17: (SB-IMPL::%READ-PRESERVING-WHITESPACE # T NIL T) 18: (SB-IMPL::%READ-PRESERVING-WHITESPACE # T NIL NIL) 19: (READ # T NIL NIL) 20: (SWANK::SIMPLE-REPL) 21: ((LAMBDA () :IN SWANK::SIMPLE-SERVE-REQUESTS)) 22: ((LAMBDA () :IN SWANK::SIMPLE-SERVE-REQUESTS)) 23: ((LAMBDA (SWANK-BACKEND::HANDLER FUNCTION) :IN "/Users/Patrick/.emlib/slime/swank-backend.lisp") ..) 24: (SWANK-BACKEND::CALL-WITH-BREAK-HOOK # #) 25: ((FLET SWANK-BACKEND:CALL-WITH-DEBUGGER-HOOK :IN "/Users/Patrick/.emlib/slime/swank-sbcl.lisp") # #) 26: (SWANK::SIMPLE-SERVE-REQUESTS #) 27: (SWANK::ACCEPT-CONNECTIONS # NIL NIL) 28: ((LABELS SWANK::SERVE-LOOP :IN SWANK::SETUP-SERVER)) 29: (SWANK::SETUP-SERVER 0 # NIL NIL NIL) 30: (SB-INT:SIMPLE-EVAL-IN-LEXENV (FUNCALL (READ-FROM-STRING "swank:start-server") "/var/folders/b0/br9v722s5nq0j4m677ncd98c0000gn/T/slime.32805") #) 31: (SB-INT:SIMPLE-EVAL-IN-LEXENV ..) 32: (EVAL ..) 33: (SB-EXT:INTERACTIVE-EVAL ..) 34: (SB-IMPL::REPL-FUN NIL) 35: ((LAMBDA () :IN SB-IMPL::TOPLEVEL-REPL)) 36: (SB-IMPL::%WITH-REBOUND-IO-SYNTAX #) 37: (SB-IMPL::TOPLEVEL-REPL NIL) 38: (SB-IMPL::TOPLEVEL-INIT) 39: ((FLET #:WITHOUT-INTERRUPTS-BODY-222031 :IN SB-EXT:SAVE-LISP-AND-DIE)) 40: ((LABELS SB-IMPL::RESTART-LISP :IN SB-EXT:SAVE-LISP-AND-DIE)) From hans.huebner at gmail.com Sat Mar 23 17:13:14 2013 From: hans.huebner at gmail.com (=?ISO-8859-1?Q?Hans_H=FCbner?=) Date: Sat, 23 Mar 2013 18:13:14 +0100 Subject: [drakma-devel] Problem with SBCL, Drakma, and quicklisp In-Reply-To: References: Message-ID: I have just tried this (drakma:HTTP-REQUEST " http://ichart.yahoo.com/table.csv?s=IBM&a=0&b=01&c=2012&d=11&e=31&f=2012&g=d&ignore=.csv ") with Drakma from current Quicklisp and it works. I guess that you have .fasl files of old versions somewhere. Try removing ~/.cache/common-lisp/ and maybe fetch Quicklisp again. -Hans On Sat, Mar 23, 2013 at 3:03 PM, Patrick May wrote: > I'm trying to get Drakma working with SBCL. I've loaded it with > quicklisp but when I try to connect to a website in Slime, I get this error: > > The function DRAKMA::WITH-CHARACTER-STREAM-SEMANTICS is undefined. > [Condition of type UNDEFINED-FUNCTION] > > Any idea what could be causing this? I've attached the backtrace in case > that helps. > > Thanks, > > Patrick > > Backtrace: > 0: ("undefined function") > 1: (HTTP-REQUEST # http://ichart.yahoo.com/table.csv?s=IBM&a=0&b=01&c=2012&d=11&e=31&f=2012&g=d&ignore=.csv > >) > 2: (GET-YAHOO-SYMBOL-DATA "IBM" "2012-01-01" "2012-12-31") > 3: (SB-INT:SIMPLE-EVAL-IN-LEXENV (GET-YAHOO-SYMBOL-DATA "IBM" > "2012-01-01" "2012-12-31") #) > 4: (EVAL (GET-YAHOO-SYMBOL-DATA "IBM" "2012-01-01" "2012-12-31")) > 5: ((LAMBDA () :IN SWANK:EVAL-AND-GRAB-OUTPUT)) > 6: (SWANK::CALL-WITH-RETRY-RESTART "Retry SLIME evaluation request." > #) > 7: (SWANK::CALL-WITH-BUFFER-SYNTAX NIL # SWANK:EVAL-AND-GRAB-OUTPUT) {13BBF7CD}>) > 8: (SB-INT:SIMPLE-EVAL-IN-LEXENV (SWANK:EVAL-AND-GRAB-OUTPUT > "(get-yahoo-symbol-data \"IBM\" \"2012-01-01\" \"2012-12-31\")\n") > #) > 9: (EVAL (SWANK:EVAL-AND-GRAB-OUTPUT "(get-yahoo-symbol-data \"IBM\" > \"2012-01-01\" \"2012-12-31\")\n")) > 10: (SWANK:EVAL-FOR-EMACS (SWANK:EVAL-AND-GRAB-OUTPUT > "(get-yahoo-symbol-data \"IBM\" \"2012-01-01\" \"2012-12-31\")\n") > ":comp-invest" 17) > 11: (SWANK::PROCESS-REQUESTS T) > 12: (SWANK::CALL-WITH-BINDINGS ..) > 13: (SWANK::REPL-INPUT-STREAM-READ # {12971A59}> #) > 14: ((LAMBDA () :IN SB-GRAY:STREAM-READ-CHAR)) > 15: ((SB-PCL::FAST-METHOD SB-GRAY:STREAM-READ-CHAR > (SWANK-BACKEND::SLIME-INPUT-STREAM)) # # argument> #) > 16: (READ-CHAR # T > #:EOF-OBJECT #) > 17: (SB-IMPL::%READ-PRESERVING-WHITESPACE > # T NIL T) > 18: (SB-IMPL::%READ-PRESERVING-WHITESPACE > # T NIL NIL) > 19: (READ # T NIL NIL) > 20: (SWANK::SIMPLE-REPL) > 21: ((LAMBDA () :IN SWANK::SIMPLE-SERVE-REQUESTS)) > 22: ((LAMBDA () :IN SWANK::SIMPLE-SERVE-REQUESTS)) > 23: ((LAMBDA (SWANK-BACKEND::HANDLER FUNCTION) :IN > "/Users/Patrick/.emlib/slime/swank-backend.lisp") ..) > 24: (SWANK-BACKEND::CALL-WITH-BREAK-HOOK # SWANK:SWANK-DEBUGGER-HOOK> # SWANK::SIMPLE-SERVE-REQUESTS) {12971ACD}>) > 25: ((FLET SWANK-BACKEND:CALL-WITH-DEBUGGER-HOOK :IN > "/Users/Patrick/.emlib/slime/swank-sbcl.lisp") # SWANK:SWANK-DEBUGGER-HOOK> # SWANK::SIMPLE-SERVE-REQUESTS) {12971ACD}>) > 26: (SWANK::SIMPLE-SERVE-REQUESTS # {12971A59}>) > 27: (SWANK::ACCEPT-CONNECTIONS # {129680D1}> NIL NIL) > 28: ((LABELS SWANK::SERVE-LOOP :IN SWANK::SETUP-SERVER)) > 29: (SWANK::SETUP-SERVER 0 # {128E5F1D}> NIL NIL NIL) > 30: (SB-INT:SIMPLE-EVAL-IN-LEXENV (FUNCALL (READ-FROM-STRING > "swank:start-server") > "/var/folders/b0/br9v722s5nq0j4m677ncd98c0000gn/T/slime.32805") > #) > 31: (SB-INT:SIMPLE-EVAL-IN-LEXENV ..) > 32: (EVAL ..) > 33: (SB-EXT:INTERACTIVE-EVAL ..) > 34: (SB-IMPL::REPL-FUN NIL) > 35: ((LAMBDA () :IN SB-IMPL::TOPLEVEL-REPL)) > 36: (SB-IMPL::%WITH-REBOUND-IO-SYNTAX # SB-IMPL::TOPLEVEL-REPL) {13363095}>) > 37: (SB-IMPL::TOPLEVEL-REPL NIL) > 38: (SB-IMPL::TOPLEVEL-INIT) > 39: ((FLET #:WITHOUT-INTERRUPTS-BODY-222031 :IN SB-EXT:SAVE-LISP-AND-DIE)) > 40: ((LABELS SB-IMPL::RESTART-LISP :IN SB-EXT:SAVE-LISP-AND-DIE)) > > > _______________________________________________ > drakma-devel mailing list > drakma-devel at common-lisp.net > http://lists.common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: From patrick.may at mac.com Sat Mar 23 19:49:58 2013 From: patrick.may at mac.com (Patrick May) Date: Sat, 23 Mar 2013 15:49:58 -0400 Subject: [drakma-devel] Problem with SBCL, Drakma, and quicklisp In-Reply-To: References: Message-ID: Thanks for the quick response. I removed ~/.cache/common-lisp, started SBCL and tried to load Drakma. I got this error: * (ql:quickload "drakma") To load "drakma": Load 1 ASDF system: drakma ; Loading "drakma" [package trivial-gray-streams].................... [package flexi-streams]........................... .................................................. .................................................. [package cffi-utils].............................. [package cffi-features]........................... [package cffi-sys]... debugger invoked on a SB-EXT:PACKAGE-LOCKED-ERROR: Lock on package SB-ALIEN violated when interning SHARED-OBJECT-FILE while in package CFFI-SYS. See also: The SBCL Manual, Node "Package Locks" Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL. restarts (invokable by number or by possibly-abbreviated name): 0: [CONTINUE ] Ignore the package lock. 1: [IGNORE-ALL ] Ignore all package locks in the context of this operation. 2: [UNLOCK-PACKAGE] Unlock the package. 3: [RETRY ] Retry compiling #. 4: [ACCEPT ] Continue, treating compiling # as having been successful. 5: [ABORT ] Give up on "drakma" 6: Exit debugger, returning to top level. (SB-EXT:PACKAGE-LOCK-VIOLATION # :SYMBOL NIL :FORMAT-CONTROL "interning ~A" :FORMAT-ARGUMENTS ("SHARED-OBJECT-FILE")) 0] Is this a problem with my SBCL installation? Thanks, Patrick On Mar 23, 2013, at 1:13 PM, Hans H?bner wrote: > I have just tried this > > (drakma:HTTP-REQUEST "http://ichart.yahoo.com/table.csv?s=IBM&a=0&b=01&c=2012&d=11&e=31&f=2012&g=d&ignore=.csv") > > with Drakma from current Quicklisp and it works. I guess that you have .fasl files of old versions somewhere. Try removing ~/.cache/common-lisp/ and maybe fetch Quicklisp again. > > -Hans > > > On Sat, Mar 23, 2013 at 3:03 PM, Patrick May wrote: > I'm trying to get Drakma working with SBCL. I've loaded it with quicklisp but when I try to connect to a website in Slime, I get this error: > > The function DRAKMA::WITH-CHARACTER-STREAM-SEMANTICS is undefined. > [Condition of type UNDEFINED-FUNCTION] > > Any idea what could be causing this? I've attached the backtrace in case that helps. > > Thanks, > > Patrick > > Backtrace: > 0: ("undefined function") > 1: (HTTP-REQUEST #) > 2: (GET-YAHOO-SYMBOL-DATA "IBM" "2012-01-01" "2012-12-31") > 3: (SB-INT:SIMPLE-EVAL-IN-LEXENV (GET-YAHOO-SYMBOL-DATA "IBM" "2012-01-01" "2012-12-31") #) > 4: (EVAL (GET-YAHOO-SYMBOL-DATA "IBM" "2012-01-01" "2012-12-31")) > 5: ((LAMBDA () :IN SWANK:EVAL-AND-GRAB-OUTPUT)) > 6: (SWANK::CALL-WITH-RETRY-RESTART "Retry SLIME evaluation request." #) > 7: (SWANK::CALL-WITH-BUFFER-SYNTAX NIL #) > 8: (SB-INT:SIMPLE-EVAL-IN-LEXENV (SWANK:EVAL-AND-GRAB-OUTPUT "(get-yahoo-symbol-data \"IBM\" \"2012-01-01\" \"2012-12-31\")\n") #) > 9: (EVAL (SWANK:EVAL-AND-GRAB-OUTPUT "(get-yahoo-symbol-data \"IBM\" \"2012-01-01\" \"2012-12-31\")\n")) > 10: (SWANK:EVAL-FOR-EMACS (SWANK:EVAL-AND-GRAB-OUTPUT "(get-yahoo-symbol-data \"IBM\" \"2012-01-01\" \"2012-12-31\")\n") ":comp-invest" 17) > 11: (SWANK::PROCESS-REQUESTS T) > 12: (SWANK::CALL-WITH-BINDINGS ..) > 13: (SWANK::REPL-INPUT-STREAM-READ # #) > 14: ((LAMBDA () :IN SB-GRAY:STREAM-READ-CHAR)) > 15: ((SB-PCL::FAST-METHOD SB-GRAY:STREAM-READ-CHAR (SWANK-BACKEND::SLIME-INPUT-STREAM)) # # #) > 16: (READ-CHAR # T #:EOF-OBJECT #) > 17: (SB-IMPL::%READ-PRESERVING-WHITESPACE # T NIL T) > 18: (SB-IMPL::%READ-PRESERVING-WHITESPACE # T NIL NIL) > 19: (READ # T NIL NIL) > 20: (SWANK::SIMPLE-REPL) > 21: ((LAMBDA () :IN SWANK::SIMPLE-SERVE-REQUESTS)) > 22: ((LAMBDA () :IN SWANK::SIMPLE-SERVE-REQUESTS)) > 23: ((LAMBDA (SWANK-BACKEND::HANDLER FUNCTION) :IN "/Users/Patrick/.emlib/slime/swank-backend.lisp") ..) > 24: (SWANK-BACKEND::CALL-WITH-BREAK-HOOK # #) > 25: ((FLET SWANK-BACKEND:CALL-WITH-DEBUGGER-HOOK :IN "/Users/Patrick/.emlib/slime/swank-sbcl.lisp") # #) > 26: (SWANK::SIMPLE-SERVE-REQUESTS #) > 27: (SWANK::ACCEPT-CONNECTIONS # NIL NIL) > 28: ((LABELS SWANK::SERVE-LOOP :IN SWANK::SETUP-SERVER)) > 29: (SWANK::SETUP-SERVER 0 # NIL NIL NIL) > 30: (SB-INT:SIMPLE-EVAL-IN-LEXENV (FUNCALL (READ-FROM-STRING "swank:start-server") "/var/folders/b0/br9v722s5nq0j4m677ncd98c0000gn/T/slime.32805") #) > 31: (SB-INT:SIMPLE-EVAL-IN-LEXENV ..) > 32: (EVAL ..) > 33: (SB-EXT:INTERACTIVE-EVAL ..) > 34: (SB-IMPL::REPL-FUN NIL) > 35: ((LAMBDA () :IN SB-IMPL::TOPLEVEL-REPL)) > 36: (SB-IMPL::%WITH-REBOUND-IO-SYNTAX #) > 37: (SB-IMPL::TOPLEVEL-REPL NIL) > 38: (SB-IMPL::TOPLEVEL-INIT) > 39: ((FLET #:WITHOUT-INTERRUPTS-BODY-222031 :IN SB-EXT:SAVE-LISP-AND-DIE)) > 40: ((LABELS SB-IMPL::RESTART-LISP :IN SB-EXT:SAVE-LISP-AND-DIE)) > > > _______________________________________________ > drakma-devel mailing list > drakma-devel at common-lisp.net > http://lists.common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel > > _______________________________________________ > drakma-devel mailing list > drakma-devel at common-lisp.net > http://lists.common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel -------------- next part -------------- An HTML attachment was scrubbed... URL: From hans.huebner at gmail.com Sat Mar 23 20:17:49 2013 From: hans.huebner at gmail.com (=?ISO-8859-1?Q?Hans_H=FCbner?=) Date: Sat, 23 Mar 2013 21:17:49 +0100 Subject: [drakma-devel] Problem with SBCL, Drakma, and quicklisp In-Reply-To: References: Message-ID: Pierre, I don't know whether this is a problem with your sbcl installation, but it certainly does not look like a Drakma problem to me. First, I would make sure that I'm using the latest quicklisp, using (ql:update-client) and (ql:update-all-dists). If that didn't help, I'd upgrade to the latest SBCL release. If that did not help either, I'd ask again :) Cheers, Hans On Sat, Mar 23, 2013 at 8:49 PM, Patrick May wrote: > Thanks for the quick response. I removed ~/.cache/common-lisp, started > SBCL and tried to load Drakma. I got this error: > > * (ql:quickload "drakma") > To load "drakma": > Load 1 ASDF system: > drakma > ; Loading "drakma" > [package trivial-gray-streams].................... > [package flexi-streams]........................... > .................................................. > .................................................. > [package cffi-utils].............................. > [package cffi-features]........................... > [package cffi-sys]... > debugger invoked on a SB-EXT:PACKAGE-LOCKED-ERROR: > Lock on package SB-ALIEN violated when interning SHARED-OBJECT-FILE > while in > package CFFI-SYS. > See also: > The SBCL Manual, Node "Package Locks" > > Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL. > > restarts (invokable by number or by possibly-abbreviated name): > 0: [CONTINUE ] Ignore the package lock. > 1: [IGNORE-ALL ] Ignore all package locks in the context of this > operation. > 2: [UNLOCK-PACKAGE] Unlock the package. > 3: [RETRY ] Retry > compiling #. > 4: [ACCEPT ] Continue, treating > compiling # > as > having been successful. > 5: [ABORT ] Give up on "drakma" > 6: Exit debugger, returning to top level. > > (SB-EXT:PACKAGE-LOCK-VIOLATION > # > :SYMBOL > NIL > :FORMAT-CONTROL > "interning ~A" > :FORMAT-ARGUMENTS > ("SHARED-OBJECT-FILE")) > 0] > > Is this a problem with my SBCL installation? > > Thanks, > > Patrick > > > On Mar 23, 2013, at 1:13 PM, Hans H?bner wrote: > > I have just tried this > > (drakma:HTTP-REQUEST " > http://ichart.yahoo.com/table.csv?s=IBM&a=0&b=01&c=2012&d=11&e=31&f=2012&g=d&ignore=.csv > ") > > with Drakma from current Quicklisp and it works. I guess that you have > .fasl files of old versions somewhere. Try removing ~/.cache/common-lisp/ > and maybe fetch Quicklisp again. > > -Hans > > > On Sat, Mar 23, 2013 at 3:03 PM, Patrick May wrote: > >> I'm trying to get Drakma working with SBCL. I've loaded it with >> quicklisp but when I try to connect to a website in Slime, I get this error: >> >> The function DRAKMA::WITH-CHARACTER-STREAM-SEMANTICS is undefined. >> [Condition of type UNDEFINED-FUNCTION] >> >> Any idea what could be causing this? I've attached the backtrace in case >> that helps. >> >> Thanks, >> >> Patrick >> >> Backtrace: >> 0: ("undefined function") >> 1: (HTTP-REQUEST #> http://ichart.yahoo.com/table.csv?s=IBM&a=0&b=01&c=2012&d=11&e=31&f=2012&g=d&ignore=.csv >> >) >> 2: (GET-YAHOO-SYMBOL-DATA "IBM" "2012-01-01" "2012-12-31") >> 3: (SB-INT:SIMPLE-EVAL-IN-LEXENV (GET-YAHOO-SYMBOL-DATA "IBM" >> "2012-01-01" "2012-12-31") #) >> 4: (EVAL (GET-YAHOO-SYMBOL-DATA "IBM" "2012-01-01" "2012-12-31")) >> 5: ((LAMBDA () :IN SWANK:EVAL-AND-GRAB-OUTPUT)) >> 6: (SWANK::CALL-WITH-RETRY-RESTART "Retry SLIME evaluation request." >> #) >> 7: (SWANK::CALL-WITH-BUFFER-SYNTAX NIL #> SWANK:EVAL-AND-GRAB-OUTPUT) {13BBF7CD}>) >> 8: (SB-INT:SIMPLE-EVAL-IN-LEXENV (SWANK:EVAL-AND-GRAB-OUTPUT >> "(get-yahoo-symbol-data \"IBM\" \"2012-01-01\" \"2012-12-31\")\n") >> #) >> 9: (EVAL (SWANK:EVAL-AND-GRAB-OUTPUT "(get-yahoo-symbol-data \"IBM\" >> \"2012-01-01\" \"2012-12-31\")\n")) >> 10: (SWANK:EVAL-FOR-EMACS (SWANK:EVAL-AND-GRAB-OUTPUT >> "(get-yahoo-symbol-data \"IBM\" \"2012-01-01\" \"2012-12-31\")\n") >> ":comp-invest" 17) >> 11: (SWANK::PROCESS-REQUESTS T) >> 12: (SWANK::CALL-WITH-BINDINGS ..) >> 13: (SWANK::REPL-INPUT-STREAM-READ #> {12971A59}> #) >> 14: ((LAMBDA () :IN SB-GRAY:STREAM-READ-CHAR)) >> 15: ((SB-PCL::FAST-METHOD SB-GRAY:STREAM-READ-CHAR >> (SWANK-BACKEND::SLIME-INPUT-STREAM)) # #> argument> #) >> 16: (READ-CHAR # T >> #:EOF-OBJECT #) >> 17: (SB-IMPL::%READ-PRESERVING-WHITESPACE >> # T NIL T) >> 18: (SB-IMPL::%READ-PRESERVING-WHITESPACE >> # T NIL NIL) >> 19: (READ # T NIL NIL) >> 20: (SWANK::SIMPLE-REPL) >> 21: ((LAMBDA () :IN SWANK::SIMPLE-SERVE-REQUESTS)) >> 22: ((LAMBDA () :IN SWANK::SIMPLE-SERVE-REQUESTS)) >> 23: ((LAMBDA (SWANK-BACKEND::HANDLER FUNCTION) :IN >> "/Users/Patrick/.emlib/slime/swank-backend.lisp") ..) >> 24: (SWANK-BACKEND::CALL-WITH-BREAK-HOOK #> SWANK:SWANK-DEBUGGER-HOOK> #> SWANK::SIMPLE-SERVE-REQUESTS) {12971ACD}>) >> 25: ((FLET SWANK-BACKEND:CALL-WITH-DEBUGGER-HOOK :IN >> "/Users/Patrick/.emlib/slime/swank-sbcl.lisp") #> SWANK:SWANK-DEBUGGER-HOOK> #> SWANK::SIMPLE-SERVE-REQUESTS) {12971ACD}>) >> 26: (SWANK::SIMPLE-SERVE-REQUESTS #> {12971A59}>) >> 27: (SWANK::ACCEPT-CONNECTIONS #> {129680D1}> NIL NIL) >> 28: ((LABELS SWANK::SERVE-LOOP :IN SWANK::SETUP-SERVER)) >> 29: (SWANK::SETUP-SERVER 0 #> {128E5F1D}> NIL NIL NIL) >> 30: (SB-INT:SIMPLE-EVAL-IN-LEXENV (FUNCALL (READ-FROM-STRING >> "swank:start-server") >> "/var/folders/b0/br9v722s5nq0j4m677ncd98c0000gn/T/slime.32805") >> #) >> 31: (SB-INT:SIMPLE-EVAL-IN-LEXENV ..) >> 32: (EVAL ..) >> 33: (SB-EXT:INTERACTIVE-EVAL ..) >> 34: (SB-IMPL::REPL-FUN NIL) >> 35: ((LAMBDA () :IN SB-IMPL::TOPLEVEL-REPL)) >> 36: (SB-IMPL::%WITH-REBOUND-IO-SYNTAX #> SB-IMPL::TOPLEVEL-REPL) {13363095}>) >> 37: (SB-IMPL::TOPLEVEL-REPL NIL) >> 38: (SB-IMPL::TOPLEVEL-INIT) >> 39: ((FLET #:WITHOUT-INTERRUPTS-BODY-222031 :IN >> SB-EXT:SAVE-LISP-AND-DIE)) >> 40: ((LABELS SB-IMPL::RESTART-LISP :IN SB-EXT:SAVE-LISP-AND-DIE)) >> >> >> _______________________________________________ >> drakma-devel mailing list >> drakma-devel at common-lisp.net >> http://lists.common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel >> > > _______________________________________________ > drakma-devel mailing list > drakma-devel at common-lisp.net > http://lists.common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel > > > > _______________________________________________ > drakma-devel mailing list > drakma-devel at common-lisp.net > http://lists.common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From patrick.may at mac.com Sat Mar 23 21:35:23 2013 From: patrick.may at mac.com (Patrick May) Date: Sat, 23 Mar 2013 17:35:23 -0400 Subject: [drakma-devel] Problem with SBCL, Drakma, and quicklisp In-Reply-To: References: Message-ID: Thanks to Stas Boukarev and Dave Cooper, I'm back up and running with ccl. I've raised the problem on the sbcl list and will keep trying to find an answer. Thank you for the quick responses. Regards, Patrick On Mar 23, 2013, at 4:17 PM, Hans H?bner wrote: > Pierre, > > I don't know whether this is a problem with your sbcl installation, but it certainly does not look like a Drakma problem to me. > > First, I would make sure that I'm using the latest quicklisp, using (ql:update-client) and (ql:update-all-dists). If that didn't help, I'd upgrade to the latest SBCL release. If that did not help either, I'd ask again :) > > Cheers, > Hans > > > On Sat, Mar 23, 2013 at 8:49 PM, Patrick May wrote: > Thanks for the quick response. I removed ~/.cache/common-lisp, started SBCL and tried to load Drakma. I got this error: > > * (ql:quickload "drakma") > To load "drakma": > Load 1 ASDF system: > drakma > ; Loading "drakma" > [package trivial-gray-streams].................... > [package flexi-streams]........................... > .................................................. > .................................................. > [package cffi-utils].............................. > [package cffi-features]........................... > [package cffi-sys]... > debugger invoked on a SB-EXT:PACKAGE-LOCKED-ERROR: > Lock on package SB-ALIEN violated when interning SHARED-OBJECT-FILE while in > package CFFI-SYS. > See also: > The SBCL Manual, Node "Package Locks" > > Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL. > > restarts (invokable by number or by possibly-abbreviated name): > 0: [CONTINUE ] Ignore the package lock. > 1: [IGNORE-ALL ] Ignore all package locks in the context of this operation. > 2: [UNLOCK-PACKAGE] Unlock the package. > 3: [RETRY ] Retry > compiling #. > 4: [ACCEPT ] Continue, treating > compiling # as > having been successful. > 5: [ABORT ] Give up on "drakma" > 6: Exit debugger, returning to top level. > > (SB-EXT:PACKAGE-LOCK-VIOLATION > # > :SYMBOL > NIL > :FORMAT-CONTROL > "interning ~A" > :FORMAT-ARGUMENTS > ("SHARED-OBJECT-FILE")) > 0] > > Is this a problem with my SBCL installation? > > Thanks, > > Patrick > > > On Mar 23, 2013, at 1:13 PM, Hans H?bner wrote: > >> I have just tried this >> >> (drakma:HTTP-REQUEST "http://ichart.yahoo.com/table.csv?s=IBM&a=0&b=01&c=2012&d=11&e=31&f=2012&g=d&ignore=.csv") >> >> with Drakma from current Quicklisp and it works. I guess that you have .fasl files of old versions somewhere. Try removing ~/.cache/common-lisp/ and maybe fetch Quicklisp again. >> >> -Hans >> >> >> On Sat, Mar 23, 2013 at 3:03 PM, Patrick May wrote: >> I'm trying to get Drakma working with SBCL. I've loaded it with quicklisp but when I try to connect to a website in Slime, I get this error: >> >> The function DRAKMA::WITH-CHARACTER-STREAM-SEMANTICS is undefined. >> [Condition of type UNDEFINED-FUNCTION] >> >> Any idea what could be causing this? I've attached the backtrace in case that helps. >> >> Thanks, >> >> Patrick >> >> Backtrace: >> 0: ("undefined function") >> 1: (HTTP-REQUEST #) >> 2: (GET-YAHOO-SYMBOL-DATA "IBM" "2012-01-01" "2012-12-31") >> 3: (SB-INT:SIMPLE-EVAL-IN-LEXENV (GET-YAHOO-SYMBOL-DATA "IBM" "2012-01-01" "2012-12-31") #) >> 4: (EVAL (GET-YAHOO-SYMBOL-DATA "IBM" "2012-01-01" "2012-12-31")) >> 5: ((LAMBDA () :IN SWANK:EVAL-AND-GRAB-OUTPUT)) >> 6: (SWANK::CALL-WITH-RETRY-RESTART "Retry SLIME evaluation request." #) >> 7: (SWANK::CALL-WITH-BUFFER-SYNTAX NIL #) >> 8: (SB-INT:SIMPLE-EVAL-IN-LEXENV (SWANK:EVAL-AND-GRAB-OUTPUT "(get-yahoo-symbol-data \"IBM\" \"2012-01-01\" \"2012-12-31\")\n") #) >> 9: (EVAL (SWANK:EVAL-AND-GRAB-OUTPUT "(get-yahoo-symbol-data \"IBM\" \"2012-01-01\" \"2012-12-31\")\n")) >> 10: (SWANK:EVAL-FOR-EMACS (SWANK:EVAL-AND-GRAB-OUTPUT "(get-yahoo-symbol-data \"IBM\" \"2012-01-01\" \"2012-12-31\")\n") ":comp-invest" 17) >> 11: (SWANK::PROCESS-REQUESTS T) >> 12: (SWANK::CALL-WITH-BINDINGS ..) >> 13: (SWANK::REPL-INPUT-STREAM-READ # #) >> 14: ((LAMBDA () :IN SB-GRAY:STREAM-READ-CHAR)) >> 15: ((SB-PCL::FAST-METHOD SB-GRAY:STREAM-READ-CHAR (SWANK-BACKEND::SLIME-INPUT-STREAM)) # # #) >> 16: (READ-CHAR # T #:EOF-OBJECT #) >> 17: (SB-IMPL::%READ-PRESERVING-WHITESPACE # T NIL T) >> 18: (SB-IMPL::%READ-PRESERVING-WHITESPACE # T NIL NIL) >> 19: (READ # T NIL NIL) >> 20: (SWANK::SIMPLE-REPL) >> 21: ((LAMBDA () :IN SWANK::SIMPLE-SERVE-REQUESTS)) >> 22: ((LAMBDA () :IN SWANK::SIMPLE-SERVE-REQUESTS)) >> 23: ((LAMBDA (SWANK-BACKEND::HANDLER FUNCTION) :IN "/Users/Patrick/.emlib/slime/swank-backend.lisp") ..) >> 24: (SWANK-BACKEND::CALL-WITH-BREAK-HOOK # #) >> 25: ((FLET SWANK-BACKEND:CALL-WITH-DEBUGGER-HOOK :IN "/Users/Patrick/.emlib/slime/swank-sbcl.lisp") # #) >> 26: (SWANK::SIMPLE-SERVE-REQUESTS #) >> 27: (SWANK::ACCEPT-CONNECTIONS # NIL NIL) >> 28: ((LABELS SWANK::SERVE-LOOP :IN SWANK::SETUP-SERVER)) >> 29: (SWANK::SETUP-SERVER 0 # NIL NIL NIL) >> 30: (SB-INT:SIMPLE-EVAL-IN-LEXENV (FUNCALL (READ-FROM-STRING "swank:start-server") "/var/folders/b0/br9v722s5nq0j4m677ncd98c0000gn/T/slime.32805") #) >> 31: (SB-INT:SIMPLE-EVAL-IN-LEXENV ..) >> 32: (EVAL ..) >> 33: (SB-EXT:INTERACTIVE-EVAL ..) >> 34: (SB-IMPL::REPL-FUN NIL) >> 35: ((LAMBDA () :IN SB-IMPL::TOPLEVEL-REPL)) >> 36: (SB-IMPL::%WITH-REBOUND-IO-SYNTAX #) >> 37: (SB-IMPL::TOPLEVEL-REPL NIL) >> 38: (SB-IMPL::TOPLEVEL-INIT) >> 39: ((FLET #:WITHOUT-INTERRUPTS-BODY-222031 :IN SB-EXT:SAVE-LISP-AND-DIE)) >> 40: ((LABELS SB-IMPL::RESTART-LISP :IN SB-EXT:SAVE-LISP-AND-DIE)) >> >> >> _______________________________________________ >> drakma-devel mailing list >> drakma-devel at common-lisp.net >> http://lists.common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel >> >> _______________________________________________ >> drakma-devel mailing list >> drakma-devel at common-lisp.net >> http://lists.common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel > > > _______________________________________________ > drakma-devel mailing list > drakma-devel at common-lisp.net > http://lists.common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel > > > _______________________________________________ > drakma-devel mailing list > drakma-devel at common-lisp.net > http://lists.common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel -------------- next part -------------- An HTML attachment was scrubbed... URL: