I try to make relatively large queries on the 2MASS catalogue with astroquery.vizier.VizierClass.query_region()
.
While it works for small areas, it fails for large area. Here is the code I use:
from astroquery.vizier import Vizier
import astropy.units as u
import astropy.coordinates as coord
twomass_query=Vizier(columns=["Jmag","Hmag","Kmag","e_Jmag","e_Hmag","e_Kmag","Qflg"],
catalog=["II/246/out"])
twomass_query.ROW_LIMIT = -1
twomass_query.TIMEOUT = 3600
table=twomass_query.query_region(
coord.SkyCoord(ra=159.5, dec=-64.6, unit=(u.deg, u.deg), frame='icrs'),
width=[10*u.deg,10*u.deg],
return_type='asu-binfits')
I receive a long error meesage ending with:
ConnectionError: ('Connection aborted.', BadStatusLine("''",))
The syntax is correct since requesting a smaller box with e.g.
width=[3*u.deg,3*u.deg]
works fine.
I also tried to switch to another ViZieR server (vizier.cfa.harvard.edu) to rule out a pb on the server side but to my surprise it gave me a different error ending with:
ChunkedEncodingError: ('Connection broken: IncompleteRead(0 bytes read)', IncompleteRead(0 bytes read))