Skip to content

Commit 698ae17

Browse files
keflavichbsipocz
authored andcommitted
attempt to implement crossid form is marked as a failure for the moment
with a NotImplementedError (implying a NotTestedError....), so this will just have to sit here for a while
1 parent e8f6f69 commit 698ae17

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

astroquery/wfau/core.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -786,6 +786,7 @@ def query_cross_id_async(self, coordinates, radius=1*u.arcsec,
786786
request_payload['whereClause'] = constraints
787787
request_payload['qType'] = 'form'
788788
request_payload['selectList'] = attributes
789+
request_payload['uploadFile'] = 'file.txt'
789790
if pairing not in ('nearest','all'):
790791
raise ValueError("pairing must be one of 'nearest' or 'all'")
791792
request_payload['nearest'] = 0 if pairing=='nearest' else 1
@@ -798,8 +799,10 @@ def query_cross_id_async(self, coordinates, radius=1*u.arcsec,
798799
return request_payload
799800

800801
fh = StringIO()
802+
assert len(coordinates) > 0
801803
for crd in coordinates:
802804
fh.write("{0} {1}\n".format(crd.ra.deg, crd.dec.deg))
805+
fh.seek(0)
803806

804807

805808
if hasattr(self, 'session') and self.logged_in():
@@ -813,7 +816,11 @@ def query_cross_id_async(self, coordinates, radius=1*u.arcsec,
813816
files={'file.txt': fh},
814817
timeout=self.TIMEOUT)
815818

816-
response = self._check_page(response.url, "query finished")
819+
raise NotImplementedError("It appears we haven't implemented the file "
820+
"upload correctly. Help is needed.")
821+
822+
823+
#response = self._check_page(response.url, "query finished")
817824

818825
return response
819826

0 commit comments

Comments
 (0)