@@ -244,11 +244,8 @@ def query_region_async(self, coordinates, radius=1 * u.deg,
244244 def _parse_result (self , response , verbose = False ):
245245 if not verbose :
246246 commons .suppress_vo_warnings ()
247- # fix to replace non standard datatype 'integer' in returned VOTable
248- # with 'int' to make it parsable by astropy.io.votable
249- integer_re = re .compile (r'datatype="integer"' )
250- content = response .text
251- new_content = integer_re .sub (r'datatype="int"' , content )
247+
248+ new_content = response .text
252249
253250 # these are pretty bad hacks, but also needed...
254251 days_re = re .compile (r'unit="days" datatype="double"' )
@@ -257,10 +254,17 @@ def _parse_result(self, response, verbose=False):
257254 degrees_re = re .compile (r'unit="degrees" datatype="double"' )
258255 new_content = degrees_re .sub (r'unit="degrees" datatype="char" '
259256 'arraysize="*"' , new_content )
257+ telconfig_re = re .compile (r'datatype="char" name="Telescope:config"' )
258+ new_content = telconfig_re .sub (r'datatype="char"'
259+ 'name="Telescope:config"'
260+ ' arraysize="*"' , new_content )
261+
262+ datatype_mapping = {'integer' :'long' }
260263
261264 try :
262265 tf = six .BytesIO (new_content .encode ())
263- first_table = votable .parse (tf , pedantic = False ).get_first_table ()
266+ first_table = votable .parse (tf , pedantic = False ,
267+ datatype_mapping = datatype_mapping ).get_first_table ()
264268 try :
265269 table = first_table .to_table (use_names_over_ids = True )
266270 except TypeError :
0 commit comments