cache so I don't need the internets?
davidwhogg opened this issue · comments
David W. Hogg commented
I have run the same set of kplr commands many time, but when I turn off the internet I get:
Traceback (most recent call last):
File "hlm.py", line 160, in <module>
tpf = get_target_pixel_file(kicid, 5)
File "hlm.py", line 33, in get_target_pixel_file
kic = client.star(kicid)
File "build/bdist.macosx-10.9-intel/egg/kplr/api.py", line 294, in star
File "build/bdist.macosx-10.9-intel/egg/kplr/api.py", line 283, in stars
File "build/bdist.macosx-10.9-intel/egg/kplr/api.py", line 158, in mast_request
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 127, in urlopen
return _opener.open(url, data, timeout)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 404, in open
response = self._open(req, data)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 422, in _open
'_open', req)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 382, in _call_chain
result = func(*args)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1214, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1184, in do_open
raise URLError(err)
urllib2.URLError: <urlopen error [Errno 8] nodename nor servname provided, or not known>
David W. Hogg commented
ps. if it downloads every time, perhaps it should cache and check the cache first?
David W. Hogg commented
pps. We just sort-of decided on a use_cache = True
style modification.