@@ -98,7 +98,7 @@ def query_region_async(self, coordinate, radius, cache=True, public=True,
9898
9999 if payload is None :
100100 payload = {}
101- payload .update ({'raDecCoordinates ' : rdc })
101+ payload .update ({'ra_dec ' : rdc })
102102
103103 return self .query_async (payload , cache = cache , public = public ,
104104 science = science , ** kwargs )
@@ -381,7 +381,7 @@ def _parse_result(self, response, verbose=False):
381381 tf = six .BytesIO (response .content )
382382 vo_tree = votable .parse (tf , pedantic = False , invalid = 'mask' )
383383 first_table = vo_tree .get_first_table ()
384- table = first_table .to_table ()
384+ table = first_table .to_table (use_names_over_ids = True )
385385 return table
386386
387387 def _login (self , username , store_password = False ):
@@ -714,24 +714,26 @@ def _parse_staging_request_page(self, data_list_page):
714714
715715 root = BeautifulSoup (data_list_page .content , 'html5lib' )
716716
717- for link in root .findAll ('a' ):
718- if 'script.sh' in link .text :
719- download_script_url = urljoin (self .dataarchive_url ,
720- link ['href' ])
721-
722- download_script = self ._request ('GET' , download_script_url ,
723- cache = False )
724- download_script_target_urls = []
725- for line in download_script .text .split ('\n ' ):
726- if line and line .split () and line .split ()[0 ] == 'wget' :
727- download_script_target_urls .append (line .split ()[1 ].strip ('"' ))
728-
729- if len (download_script_target_urls ) == 0 :
730- raise RemoteServiceError ("There was an error parsing the download "
731- "script; it is empty. "
732- "You can access the download script "
733- "directly from this URL: "
734- "{0}" .format (download_script_url ))
717+ #for link in root.findAll('a'):
718+ # if 'script.sh' in link.text:
719+ # download_script_url = urljoin(self.dataarchive_url,
720+ # link['href'])
721+ #if 'download_script_url' not in locals():
722+ # raise RemoteServiceError("No download links were found.")
723+
724+ #download_script = self._request('GET', download_script_url,
725+ # cache=False)
726+ #download_script_target_urls = []
727+ #for line in download_script.text.split('\n'):
728+ # if line and line.split() and line.split()[0] == 'wget':
729+ # download_script_target_urls.append(line.split()[1].strip('"'))
730+
731+ #if len(download_script_target_urls) == 0:
732+ # raise RemoteServiceError("There was an error parsing the download "
733+ # "script; it is empty. "
734+ # "You can access the download script "
735+ # "directly from this URL: "
736+ # "{0}".format(download_script_url))
735737
736738 data_table = root .findAll ('table' , class_ = 'list' , id = 'report' )[0 ]
737739 columns = {'uid' :[], 'URL' :[], 'size' :[]}
@@ -799,32 +801,31 @@ def _parse_staging_request_page(self, data_list_page):
799801
800802 if len (columns ['uid' ]) == 0 :
801803 raise RemoteServiceError ("No valid UIDs were found in the staged "
802- "data table. Please include {0} and {1} "
804+ "data table. Please include {0} "
803805 "in a bug report."
804- .format (self ._staging_log ['data_list_url' ],
805- download_script_url ))
806-
807- if len (download_script_target_urls ) != len (columns ['URL' ]):
808- log .warn ("There was an error parsing the data staging page. "
809- "The results from the page and the download script "
810- "differ. You can access the download script directly "
811- "from this URL: {0}" .format (download_script_url ))
812- else :
813- bad_urls = []
814- for (rurl ,url ) in (zip (columns ['URL' ],
815- download_script_target_urls )):
816- if rurl == 'None_Found' :
817- url_uid = os .path .split (url )[- 1 ]
818- ind = np .where (np .array (columns ['uid' ]) == url_uid )[0 ][0 ]
819- columns ['URL' ][ind ] = url
820- elif rurl != url :
821- bad_urls .append ((rurl , url ))
822- if bad_urls :
823- log .warn ("There were mismatches between the parsed URLs "
824- "from the staging page ({0}) and the download "
825- "script ({1})."
826- .format (self ._staging_log ['data_list_url' ],
827- download_script_url ))
806+ .format (self ._staging_log ['data_list_url' ]))
807+
808+ #if len(download_script_target_urls) != len(columns['URL']):
809+ # log.warn("There was an error parsing the data staging page. "
810+ # "The results from the page and the download script "
811+ # "differ. You can access the download script directly "
812+ # "from this URL: {0}".format(download_script_url))
813+ #else:
814+ # bad_urls = []
815+ # for (rurl,url) in (zip(columns['URL'],
816+ # download_script_target_urls)):
817+ # if rurl == 'None_Found':
818+ # url_uid = os.path.split(url)[-1]
819+ # ind = np.where(np.array(columns['uid']) == url_uid)[0][0]
820+ # columns['URL'][ind] = url
821+ # elif rurl != url:
822+ # bad_urls.append((rurl, url))
823+ # if bad_urls:
824+ # log.warn("There were mismatches between the parsed URLs "
825+ # "from the staging page ({0}) and the download "
826+ # "script ({1})."
827+ # .format(self._staging_log['data_list_url'],
828+ # download_script_url))
828829
829830 tbl = Table ([Column (name = k , data = v ) for k ,v in iteritems (columns )])
830831
0 commit comments