Processing 2000460...
2000460 (460 Scania (1900 FN))
Processing 2000628...
---------------------------------------------------------------------------
KeyboardInterrupt Traceback (most recent call last)
<ipython-input-8-c749a1382b9f> in <module>()
25 #get ephemerides for specified observation windows in 1m increments
26 ch.set_epochrange(dt[0].strftime("%Y/%m/%d %H:%M:%S"), dt[1].strftime("%Y/%m/%d %H:%M:%S"), '1m')
---> 27 ch.get_ephemerides(observatory)
28 #count minutes where targets is at an elevation > min_elev
29 for i in range(0,len(ch)):
C:\owncloud\code\giterdone\asteroids\callhorizons2\callhorizons.pyc in get_ephemerides(self, observatory_code, airmass_lessthan, solar_elongation, skip_daylight)
486 while True:
487 try:
--> 488 src = urllib.urlopen(url).readlines()
489 break
490 except urllib.URLError:
C:\Users\mcnow\Anaconda2\lib\urllib2.pyc in urlopen(url, data, timeout, cafile, capath, cadefault, context)
152 else:
153 opener = _opener
--> 154 return opener.open(url, data, timeout)
155
156 def install_opener(opener):
C:\Users\mcnow\Anaconda2\lib\urllib2.pyc in open(self, fullurl, data, timeout)
433 for processor in self.process_response.get(protocol, []):
434 meth = getattr(processor, meth_name)
--> 435 response = meth(req, response)
436
437 return response
C:\Users\mcnow\Anaconda2\lib\urllib2.pyc in http_response(self, request, response)
546 if not (200 <= code < 300):
547 response = self.parent.error(
--> 548 'http', request, response, code, msg, hdrs)
549
550 return response
C:\Users\mcnow\Anaconda2\lib\urllib2.pyc in error(self, proto, *args)
465 http_err = 0
466 args = (dict, proto, meth_name) + args
--> 467 result = self._call_chain(*args)
468 if result:
469 return result
C:\Users\mcnow\Anaconda2\lib\urllib2.pyc in _call_chain(self, chain, kind, meth_name, *args)
405 func = getattr(handler, meth_name)
406
--> 407 result = func(*args)
408 if result is not None:
409 return result
C:\Users\mcnow\Anaconda2\lib\urllib2.pyc in http_error_302(self, req, fp, code, msg, headers)
652 fp.close()
653
--> 654 return self.parent.open(new, timeout=req.timeout)
655
656 http_error_301 = http_error_303 = http_error_307 = http_error_302
C:\Users\mcnow\Anaconda2\lib\urllib2.pyc in open(self, fullurl, data, timeout)
427 req = meth(req)
428
--> 429 response = self._open(req, data)
430
431 # post-process response
C:\Users\mcnow\Anaconda2\lib\urllib2.pyc in _open(self, req, data)
445 protocol = req.get_type()
446 result = self._call_chain(self.handle_open, protocol, protocol +
--> 447 '_open', req)
448 if result:
449 return result
C:\Users\mcnow\Anaconda2\lib\urllib2.pyc in _call_chain(self, chain, kind, meth_name, *args)
405 func = getattr(handler, meth_name)
406
--> 407 result = func(*args)
408 if result is not None:
409 return result
C:\Users\mcnow\Anaconda2\lib\urllib2.pyc in https_open(self, req)
1239 def https_open(self, req):
1240 return self.do_open(httplib.HTTPSConnection, req,
-> 1241 context=self._context)
1242
1243 https_request = AbstractHTTPHandler.do_request_
C:\Users\mcnow\Anaconda2\lib\urllib2.pyc in do_open(self, http_class, req, **http_conn_args)
1193
1194 try:
-> 1195 h.request(req.get_method(), req.get_selector(), req.data, headers)
1196 except socket.error, err: # XXX what error?
1197 h.close()
C:\Users\mcnow\Anaconda2\lib\httplib.pyc in request(self, method, url, body, headers)
1040 def request(self, method, url, body=None, headers={}):
1041 """Send a complete request to the server."""
-> 1042 self._send_request(method, url, body, headers)
1043
1044 def _set_content_length(self, body, method):
C:\Users\mcnow\Anaconda2\lib\httplib.pyc in _send_request(self, method, url, body, headers)
1080 for hdr, value in headers.iteritems():
1081 self.putheader(hdr, value)
-> 1082 self.endheaders(body)
1083
1084 def getresponse(self, buffering=False):
C:\Users\mcnow\Anaconda2\lib\httplib.pyc in endheaders(self, message_body)
1036 else:
1037 raise CannotSendHeader()
-> 1038 self._send_output(message_body)
1039
1040 def request(self, method, url, body=None, headers={}):
C:\Users\mcnow\Anaconda2\lib\httplib.pyc in _send_output(self, message_body)
880 msg += message_body
881 message_body = None
--> 882 self.send(msg)
883 if message_body is not None:
884 #message_body was not a string (i.e. it is a file) and
C:\Users\mcnow\Anaconda2\lib\httplib.pyc in send(self, data)
842 if self.sock is None:
843 if self.auto_open:
--> 844 self.connect()
845 else:
846 raise NotConnected()
C:\Users\mcnow\Anaconda2\lib\httplib.pyc in connect(self)
1253 "Connect to a host on a given (SSL) port."
1254
-> 1255 HTTPConnection.connect(self)
1256
1257 if self._tunnel_host:
C:\Users\mcnow\Anaconda2\lib\httplib.pyc in connect(self)
819 """Connect to the host and port specified in __init__."""
820 self.sock = self._create_connection((self.host,self.port),
--> 821 self.timeout, self.source_address)
822
823 if self._tunnel_host:
C:\Users\mcnow\Anaconda2\lib\socket.pyc in create_connection(address, timeout, source_address)
564 if source_address:
565 sock.bind(source_address)
--> 566 sock.connect(sa)
567 return sock
568
C:\Users\mcnow\Anaconda2\lib\socket.pyc in meth(name, self, *args)
226
227 def meth(name,self,*args):
--> 228 return getattr(self._sock,name)(*args)
229
230 for _m in _socketmethods:
KeyboardInterrupt: