There may be a random aspect in values_count, but this stilll seems to lead consistently to:
Exception has occurred: IndexError (note: full exception trace is shown but execution is paused at: _run_module_as_main)
list index out of range
File "/home/xyzxyz/src/pybomwater/pybomwater/bom_water.py", line 418, in values_count
value_nodes = observations[0].findall(query_measurement)
~~~~~~~~~~~~^^^
File "/home/xyzxyz/src/pybomwater/pybomwater/bom_water.py", line 332, in define_request_chunking_size
values_count = self.values_count(response)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/xyzxyz/src/pybomwater/pybomwater/bom_water.py", line 355, in batch_request_observations
chunk_size = self.define_request_chunking_size( station_no, property, procedure, t_begin, t_end )
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/xyzxyz/src/pybomwater/pybomwater/bom_water.py", line 348, in get_spatially_filtered_observations
return self.batch_request_observations(property, procedure, t_begin, t_end, filtered_features)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/xyzxyz/src/a2s-mdb/notebooks/bom_water_temp_downloader.py", line 69, in <module>
results = bm.get_spatially_filtered_observations( None, str(spatial_path), coords, prop, procedure, t_begin, t_end)
IndexError: list index out of range
Noticed using the version on the main branch as I write, i.e this commit
Observations
The method
values_count
appears to expect at least one observation to be available querying the response; we hit a case where there is none.Reproduction
There may be a random aspect in
values_count
, but this stilll seems to lead consistently to:This appears to fail for feature 'http://bom.gov.au/waterdata/services/stations/425012'