cancel
Showing results for 
Search instead for 
Did you mean: 

Error Messages

Jamie_Dumbill
New Contributor
Received: by 10.100.83.6 with SMTP id g6mr280345anb.39.1254481485622; Fri, 02
Oct 2009 04:04:45 -0700 (PDT)
Date: Fri, 2 Oct 2009 04:04:45 -0700 (PDT)
X-IP: 158.125.101.246
User-Agent: G2/1.0
X-Google-Token: U13K-QwAAAAxjXwbYspmY1vpg9OpfumX
X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_8; en-us)
AppleWebKit/531.9 (KHTML, like Gecko) Version/4.0.3 Safari/531.9,gzip(gfe),gzip(gfe)
Message-ID: <66c79b27-8b1f-4cd0-9e65-d96eb2cf448b@m38g2000yqd.googlegroups.com>
Subject: Error Messages
From: Jamie Dumbill
To: "Kdb+ Personal Developers"
X-Google-Approved: charlie@kx.com via web at 2009-10-02 13:44:19

Hi,

Is anyone aware of a comprehensive list of error messages. I've seen
this list https://code.kx.com/trac/wiki/errors but I'm getting a
`close error when making a http request to GET a csv from yahoo. The
code I'm using is:

quote:`:http://download.finance.yahoo.com "GET /d/quotes.csv?
s=AAPL&f=sl1d1t1c1ohgv&e=.csv, http/1.1\r
\nhost:download.finance.yahoo.com\r\n\r\n"

3 REPLIES 3

Aaron_Davies
New Contributor


On Oct 2, 2009, at 7:04 PM, Jamie Dumbill wrote:

> Is anyone aware of a comprehensive list of error messages. I've seen
> this list https://code.kx.com/trac/wiki/errors but I'm getting a
> `close error when making a http request to GET a csv from yahoo. The
> code I'm using is:
>
> quote:`:http://download.finance.yahoo.com "GET /d/quotes.csv?
> s�PL&f=sl1d1t1c1ohgv&e=.csv, http/1.1
> host:download.finance.yahoo.com "

on my machine, your code sort of works:

% q
KDB+ 2.6 2009.09.15 Copyright (C) 1993-2009 Kx Systems
m32/ 2()core 2048MB

q)quote:`:http://download.finance.yahoo.com "GET /d/quotes.csv?
s�PL&f=sl1d1t1c1ohgv&e=.csv, http/1.1
host:download.finance.yahoo.com "
q)quote
"HTTP/1.1 200 OK Date: Fri, 02 Oct 2009 17:55:55 GMT P3P:
policyref="http://p3p.yahoo.com/w3c/p3p.xml", CP="CAO DSP COR CUR
ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi
PUBi..
q)" "vs quote
"HTTP/1.1 200 OK"
"Date: Fri, 02 Oct 2009 17:55:55 GMT"
"P3P: policyref="http://p3p.yahoo.com/w3c/p3p.xml", CP="CAO DSP COR
CUR ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi
UNRi PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA P..
"Cache-Control: private"
"Content-Type: application/octet-stream"
""
""
q)

so i seem to be getting headers, but no data

fwiw, under a different network setup, i saw the code fail completely,
but with a 'chunk error (also undocumented) instead

regarding the error you see, some errors are bubbled up from the
underlying C calls, so 'close might correspond to the "Connection
closed by foreign host" in the following telnet transcript

have you verified that issuing the commands directly through telnet
works on this machine?

% telnet download.finance.yahoo.com 80
Trying 69.147.86.169...
Connected to download.finance.fy6.b.yahoo.com.
Escape character is '^]'.
GET /d/quotes.csv?s�PL&f=sl1d1t1c1ohgv&e=.csv, http/1.1
host:download.finance.yahoo.com

HTTP/1.1 200 OK
Date: Fri, 02 Oct 2009 17:38:33 GMT
P3P: policyref="http://p3p.yahoo.com/w3c/p3p.xml", CP="CAO DSP COR CUR
ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi
PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE GOV"
Cache-Control: private
Content-Type: application/octet-stream

"AAPL",185.1781,"10/2/2009","1:23pm",
+4.3182,181.38,185.88,181.35,13468209
Connection closed by foreign host.
%

On Oct 2, 2:00�pm, Aaron Davies wrote:> On Oct 2, 2009, at 7:04 PM, Jamie Dumbill wrote:>> > Is anyone aware of a comprehensive list of error messages. I've seen �> > this listhttps://code.kx.com/trac/wiki/errorsbut I'm getting a �> > `close error when making a http request to GET a csv from yahoo. The �> > code I'm using is:>> > quote:`:http://download.finance.yahoo.com"GET /d/quotes.csv?> > s=AAPL&f=sl1d1t1c1ohgv&e=.csv, http/1.1\r> > \nhost:download.finance.yahoo.com\r\n\r\n">> on my machine, your code sort of works:>> % q> KDB+ 2.6 2009.09.15 Copyright (C) 1993-2009 Kx Systems> m32/ 2()core 2048MB>> q)quote:`:http://download.finance.yahoo.com"GET /d/quotes.csv?> s=AAPL&f=sl1d1t1c1ohgv&e=.csv, http/1.1\r> \nhost:download.finance.yahoo.com\r\n\r\n"> q)quote> "HTTP/1.1 200 OK\r\nDate: Fri, 02 Oct 2009 17:55:55 GMT\r\nP3P: �> policyref=\"http://p3p.yahoo.com/w3c/p3p.xml\", CP=\"CAO DSP COR CUR �> ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi �> PUBi..> q)"\r\n"vs quote> "HTTP/1.1 200 OK"> "Date: Fri, 02 Oct 2009 17:55:55 GMT"> "P3P: policyref=\"http://p3p.yahoo.com/w3c/p3p.xml\", CP=\"CAO DSP COR �> CUR ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi �> UNRi PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA P..> "Cache-Control: private"> "Content-Type: application/octet-stream"> ""> ""> q)>> so i seem to be getting headers, but no data>> fwiw, under a different network setup, i saw the code fail completely, �> but with a 'chunk error (also undocumented) instead>> regarding the error you see, some errors are bubbled up from the �> underlying C calls, so 'close might correspond to the "Connection �> closed by foreign host" in the following telnet transcript>> have you verified that issuing the commands directly through telnet �> works on this machine?>> % telnet download.finance.yahoo.com 80> Trying 69.147.86.169...> Connected to download.finance.fy6.b.yahoo.com.> Escape character is '^]'.> GET /d/quotes.csv?s=AAPL&f=sl1d1t1c1ohgv&e=.csv, http/1.1> host:download.finance.yahoo.com>> HTTP/1.1 200 OK> Date: Fri, 02 Oct 2009 17:38:33 GMT> P3P: policyref="http://p3p.yahoo.com/w3c/p3p.xml", CP="CAO DSP COR CUR �> ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi �> PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE GOV"> Cache-Control: private> Content-Type: application/octet-stream>> "AAPL",185.1781,"10/2/2009","1:23pm",> +4.3182,181.38,185.88,181.35,13468209> Connection closed by foreign host.> %I've given the same piece of code a go on another machine and receivedthe chunk error Aaron mentioned. On this machine the telnet requestworks fine. I was originally try to adapthttps://code.kx.com/trac/browser/cookbook_code/yahoo_compact.q as itseems to be out of date with regard to the url it uses.Thanks for your help

I see you are using 2.6 where as mine is 2.5 could this be having anyeffect.bash-3.2$ qKDB+ 2.5 2009.05.29 Copyright (C) 1993-2009 Kx Systemsm32/ 2()core 2048MBOn Oct 4, 9:14�am, Jamie Dumbill wrote:> On Oct 2, 2:00�pm, Aaron Davies wrote:>>>>>> > On Oct 2, 2009, at 7:04 PM, Jamie Dumbill wrote:>> > > Is anyone aware of a comprehensive list of error messages. I've seen �> > > this listhttps://code.kx.com/trac/wiki/errorsbutI'm getting a �> > > `close error when making a http request to GET a csv from yahoo. The �> > > code I'm using is:>> > > quote:`:http://download.finance.yahoo.com"GET /d/quotes.csv?> > > s=AAPL&f=sl1d1t1c1ohgv&e=.csv, http/1.1\r> > > \nhost:download.finance.yahoo.com\r\n\r\n">> > on my machine, your code sort of works:>> > % q> > KDB+ 2.6 2009.09.15 Copyright (C) 1993-2009 Kx Systems> > m32/ 2()core 2048MB>> > q)quote:`:http://download.finance.yahoo.com"GET /d/quotes.csv?> > s=AAPL&f=sl1d1t1c1ohgv&e=.csv, http/1.1\r> > \nhost:download.finance.yahoo.com\r\n\r\n"> > q)quote> > "HTTP/1.1 200 OK\r\nDate: Fri, 02 Oct 2009 17:55:55 GMT\r\nP3P: �> > policyref=\"http://p3p.yahoo.com/w3c/p3p.xml\", CP=\"CAO DSP COR CUR �> > ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi �> > PUBi..> > q)"\r\n"vs quote> > "HTTP/1.1 200 OK"> > "Date: Fri, 02 Oct 2009 17:55:55 GMT"> > "P3P: policyref=\"http://p3p.yahoo.com/w3c/p3p.xml\", CP=\"CAO DSP COR �> > CUR ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi �> > UNRi PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA P..> > "Cache-Control: private"> > "Content-Type: application/octet-stream"> > ""> > ""> > q)>> > so i seem to be getting headers, but no data>> > fwiw, under a different network setup, i saw the code fail completely, �> > but with a 'chunk error (also undocumented) instead>> > regarding the error you see, some errors are bubbled up from the �> > underlying C calls, so 'close might correspond to the "Connection �> > closed by foreign host" in the following telnet transcript>> > have you verified that issuing the commands directly through telnet �> > works on this machine?>> > % telnet download.finance.yahoo.com 80> > Trying 69.147.86.169...> > Connected to download.finance.fy6.b.yahoo.com.> > Escape character is '^]'.> > GET /d/quotes.csv?s=AAPL&f=sl1d1t1c1ohgv&e=.csv, http/1.1> > host:download.finance.yahoo.com>> > HTTP/1.1 200 OK> > Date: Fri, 02 Oct 2009 17:38:33 GMT> > P3P: policyref="http://p3p.yahoo.com/w3c/p3p.xml", CP="CAO DSP COR CUR �> > ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi �> > PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE GOV"> > Cache-Control: private> > Content-Type: application/octet-stream>> > "AAPL",185.1781,"10/2/2009","1:23pm",> > +4.3182,181.38,185.88,181.35,13468209> > Connection closed by foreign host.> > %>> I've given the same piece of code a go on another machine and received> the chunk error Aaron mentioned. On this machine the telnet request> works fine. I was originally try to adapthttps://code.kx.com/trac/browser/cookbook_code/yahoo_compact.qas it> seems to be out of date with regard to the url it uses.>> Thanks for your help