{"record":{"id":"c07e307b4f518aff","repo":"OpenBB-finance/OpenBB","slug":"error-no-data-to-plot-c07e30","errorCode":null,"errorMessage":"Error: No data to plot.","messagePattern":"Error: No data to plot\\.","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"openbb_platform/extensions/technical/openbb_technical/technical_views.py","lineNumber":354,"sourceCode":"        # pylint: disable=import-outside-toplevel\n        from openbb_charting.charts import relative_rotation  # noqa\n        from openbb_charting.core.chart_style import ChartStyle  # noqa\n        from openbb_charting.core.openbb_figure import OpenBBFigure  # noqa\n        from openbb_core.app.utils import basemodel_to_df  # noqa\n\n        ratios_df = basemodel_to_df(kwargs[\"obbject_item\"].rs_ratios, index=\"date\")  # type: ignore\n        momentum_df = basemodel_to_df(kwargs[\"obbject_item\"].rs_momentum, index=\"date\")  # type: ignore\n        benchmark_symbol = kwargs[\"obbject_item\"].benchmark  # type: ignore\n        study = kwargs.get(\"study\")\n        study = str(kwargs[\"obbject_item\"].study) if study is None else str(study)\n        show_tails = kwargs.get(\"show_tails\")\n        show_tails = True if show_tails is None else show_tails\n        tail_periods = int(kwargs.get(\"tail_periods\")) if \"tail_periods\" in kwargs else 16  # type: ignore\n        tail_interval = str(kwargs.get(\"tail_interval\")) if \"tail_interval\" in kwargs else \"week\"  # type: ignore\n        date = kwargs.get(\"date\") if \"date\" in kwargs else None  # type: ignore\n        show_tails = False if date is not None else show_tails\n        if ratios_df.empty or momentum_df.empty:\n            raise RuntimeError(\"Error: No data to plot.\")\n\n        if show_tails is True:\n            fig = relative_rotation.create_rrg_with_tails(\n                ratios_df,\n                momentum_df,\n                study,\n                benchmark_symbol,\n                tail_periods,\n                tail_interval,  # type: ignore\n            )\n\n        if show_tails is False:\n            fig = relative_rotation.create_rrg_without_tails(\n                ratios_df,\n                momentum_df,\n                benchmark_symbol,\n                study,\n                date,  # type: ignore","sourceCodeStart":336,"sourceCodeEnd":372,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/extensions/technical/openbb_technical/technical_views.py#L336-L372","documentation":"The Relative Rotation Chart (RRG) view raises this RuntimeError when either the rs_ratios or rs_momentum DataFrame converted from the OBBject is empty. RRG plots need both the relative-strength ratio and momentum series for the comparison universe; empty results (e.g. the upstream relative_rotation endpoint returned nothing for the benchmark/date range) leave nothing to plot.","triggerScenarios":"Calling chart/relative_rotation (or .charting() on a relative rotation OBBject) where the provider returned zero rows for rs_ratios or rs_momentum; symbol universe empty for the requested date; benchmark symbol invalid so all ratio computations were dropped.","commonSituations":"Requesting an RRG with a date too old/new for provider coverage; provider API returning an empty payload silently; symbols parameter that matched no providers.","solutions":["Check res.extra['metadata'] or res.results fields for emptiness before charting: assert res.rs_ratios and res.rs_momentum","Widen the date range or use a well-covered benchmark/symbol set","Verify the symbols were valid by inspecting the raw OBBject results before calling .charting()"],"exampleFix":"# before\nres = obb.technical.relative_rotation(...)\nres.charting()\n\n# after\nres = obb.technical.relative_rotation(...)\nassert res.rs_ratios and res.rs_momentum, 'RRG data empty; adjust symbols/dates'\nres.charting()","handlingStrategy":"validation","validationCode":"res = obb.technical.relative_rotation(...)\nif not res.results or not getattr(res.results, 'rs_ratios', None) or not getattr(res.results, 'rs_momentum', None):\n    raise RuntimeError('no RRG data; check symbols and date range')","typeGuard":null,"tryCatchPattern":"try:\n    res.charting()\nexcept RuntimeError as e:\n    if 'No data to plot' in str(e):\n        logging.warning('RRG returned empty series; retrying with wider dates')","preventionTips":["Assert both rs_ratios and rs_momentum are non-empty before charting","Use liquid benchmarks and well-covered symbols","Check provider coverage for the requested date"],"tags":["openbb","charting","rrg","empty-data"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}