@@ -108,6 +108,7 @@ def __init__(self, ROW_LIMIT=None):
108
108
self ._server = conf .server
109
109
self ._tap = None
110
110
self ._hardlimit = None
111
+ self ._uploadlimit = None
111
112
# attributes to construct ADQL queries
112
113
self ._columns_in_output = None # a list of _Column
113
114
self .joins = [] # a list of _Join
@@ -166,6 +167,12 @@ def hardlimit(self):
166
167
self ._hardlimit = self .tap .hardlimit
167
168
return self ._hardlimit
168
169
170
+ @property
171
+ def uploadlimit (self ):
172
+ if self ._uploadlimit is None :
173
+ self ._uploadlimit = self .tap .get_tap_capability ().uploadlimit .hard .content
174
+ return self ._uploadlimit
175
+
169
176
@property
170
177
def columns_in_output (self ):
171
178
"""A list of _Column.
@@ -780,9 +787,9 @@ def query_region(self, coordinates, radius=2*u.arcmin, *,
780
787
781
788
# from uploadLimit in SIMBAD's capabilities
782
789
# http://simbad.cds.unistra.fr/simbad/sim-tap/capabilities
783
- if len (center ) > 200000 :
784
- raise ValueError ("'query_region' can process up to 200000 centers. For "
785
- "larger queries, split your centers list." )
790
+ if len (center ) > self . uploadlimit :
791
+ raise ValueError (f "'query_region' can process up to { self . uploadlimit } "
792
+ "centers. For larger queries, split your centers list." )
786
793
787
794
# `radius` as `str` is iterable, but contains only one value.
788
795
if isiterable (radius ) and not isinstance (radius , str ):
0 commit comments