Skip to content

Smart Mooring data query broken for moorings with "new" sensors (anything not RBR temperature + pressure) #9

@ciaradorsay

Description

@ciaradorsay

Query:

start_date = datetime(2025, 1, 15, 0) end_date = start_date + timedelta( hours=2 )

swh_data = get_spotter_data( spotter_ids="SPOT-31088C", start_date=start_date, end_date=end_date, data_type="smartMooringData", )

Error code:

Traceback (most recent call last): File "/Users/ciarasofar/Documents/Git_repos/esm-assessment/.venv/lib/python3.11/site-packages/roguewave/filecache/cache_object.py", line 639, in _worker cache_miss.download_function(cache_miss.uri, cache_miss.filepath) File "/Users/ciarasofar/Documents/Git_repos/esm-assessment/.venv/lib/python3.11/site-packages/roguewave/spotterapi/spotter_cache.py", line 73, in get_data_from_wavefleet data = self._handlers[request_type](session=self.session, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/ciarasofar/Documents/Git_repos/esm-assessment/.venv/lib/python3.11/site-packages/roguewave/spotterapi/spotterapi.py", line 315, in _download_data data = as_dataframe(data) ^^^^^^^^^^^^^^^^^^ File "/Users/ciarasofar/Documents/Git_repos/esm-assessment/.venv/lib/python3.11/site-packages/roguewave/spotterapi/helper_functions.py", line 170, in as_dataframe data[key].append(dictionary[key]) ~~~~~~~~~~^^^^^ KeyError: 'bristlemouth_node_id'

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions