OpenBB-finance/OpenBB · warning · OpenBBError
All requests were returned empty.
Error message
All requests were returned empty.
What it means
Raised after all 24 chokepoint fetches completed without exception but every one returned an empty list, so chokepoints_data is empty. It guards against silently returning [] which callers would mistake for valid no-data; the usual cause is an invalid/unmapped date window for which the service returns 200 with no features.
Source
Thrown at openbb_platform/providers/imf/openbb_imf/utils/port_watch_helpers.py:229
"""Get the daily chokepoint data for a specific chokepoint."""
try:
data = await get_daily_chokepoint_data(chokepoint_id, start_date, end_date)
chokepoints_data.extend(data)
except Exception as e:
raise OpenBBError(f"Failed to fetch data for {chokepoint_id}: {e}") from e
try:
gather_results = await asyncio.gather(
*[_get_one_chokepoint_data(cp) for cp in chokepoints],
return_exceptions=True,
)
for result in gather_results:
if isinstance(result, (OpenBBError, Exception)):
raise result
if not chokepoints_data:
raise OpenBBError("All requests were returned empty.")
return chokepoints_data
except Exception as e:
raise OpenBBError(
f"Error in fetching chokepoint data: {e} -> {e.args[0]}"
) from e
@alru_cache(maxsize=1)
async def get_all_daily_port_activity_data() -> list:
"""Get all port activity data as a bulk download CSV.
This function fetches a large file containing daily global port activity.
Expect the file to be around 800 MB in size.
Returns
-------View on GitHub (pinned to 3e071fcc2c)
Solutions
- Verify the date window overlaps Port Watch coverage (2019-01-01 to present).
- Confirm start_date <= end_date and both are 'YYYY-MM-DD'.
- If dates are sane, retry later — the ArcGIS service occasionally returns empty during reindexing.
Defensive patterns
Strategy: validation
Validate before calling
from datetime import date
COVERAGE_START = date(2019, 1, 1)
def valid_window(start: date, end: date) -> bool:
return start <= end and start >= COVERAGE_START and end <= date.today() Try / catch
try:
data = await get_all_chokepoints_data(start, end)
except OpenBBError as e:
if 'All requests were returned empty' in str(e):
# date window problem, not an outage: fix inputs, do not blind-retry
raise InvalidRange('Adjust dates to Port Watch coverage (2019..today)') from e
raise Prevention
- Clamp requested date windows to Port Watch coverage before calling.
- Validate start <= end at input parsing.
When it happens
Trigger: start_date/end_date outside the Port Watch coverage (e.g. future dates or pre-2019 ranges), dates formatted in an order the query builder misinterprets, or upstream dataset temporarily empty.
Common situations: Defaulting start_date far in the past, swapping start/end arguments, timezone-shifted 'today' producing a future-only window.
Related errors
- Failed to fetch data: {response.status}
- Failed to fetch data for {chokepoint_id}: {e}
- Error in fetching chokepoint data: {e} -> {e.args[0]}
- OBBject Extension Error -> An OBBject extension that acts
- No results found. Try adjusting the query parameters.
AI-assisted analysis of OpenBB-finance/OpenBB@3e071fcc2c (2026-08-14).
Data as JSON: /api/errors/961afd57d431159a.
Report an issue: GitHub.