{"record":{"id":"464d9325a91bf80a","repo":"OpenBB-finance/OpenBB","slug":"no-data-was-returned-for-any-symbol-464d93","errorCode":null,"errorMessage":"No data was returned for any symbol","messagePattern":"No data was returned for any symbol","errorType":"exception","errorClass":"EmptyDataError","httpStatus":null,"severity":"warning","filePath":"openbb_platform/providers/finviz/openbb_finviz/models/price_target.py","lineNumber":119,"sourceCode":"                price_targets = price_targets.replace(\"\", None).drop(columns=\"Price\")\n            except Exception as e:  # pylint: disable=W0718\n                messages.append(f\"Failed to get data for {symbol} -> {e}\")\n                return result\n            result = price_targets.to_dict(orient=\"records\")\n            return result\n\n        symbols = query.symbol.split(\",\") if query.symbol else []\n\n        for symbol in symbols:\n            result = get_one(symbol)\n            if result:\n                results.extend(result)\n\n        if not results and messages:\n            raise OpenBBError(\"\\n\".join(messages))\n\n        if not results and not messages:\n            raise EmptyDataError(\"No data was returned for any symbol\")\n\n        if results and messages:\n            for message in messages:\n                warn(message)\n\n        return results\n\n    @staticmethod\n    def transform_data(\n        query: FinvizPriceTargetQueryParams,\n        data: list[dict],\n        **kwargs: Any,\n    ) -> list[FinvizPriceTargetData]:\n        \"\"\"Transform and validate the raw data.\"\"\"\n        return [FinvizPriceTargetData.model_validate(d) for d in data]\n","sourceCodeStart":101,"sourceCodeEnd":135,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/providers/finviz/openbb_finviz/models/price_target.py#L101-L135","documentation":"Finviz price target raises EmptyDataError('No data was returned for any symbol') when the loop over symbols produced zero rows and no error messages were collected. Distinguished from the OpenBBError variant: here symbols were accepted but returned nothing, so there is nothing to report.","triggerScenarios":"Symbols with no analyst price targets on Finviz; an empty symbol string (query.symbol falsy gives an empty list and immediate EmptyDataError).","commonSituations":"Passing symbol='' or None through a template; illiquid tickers without analyst coverage.","solutions":["Ensure a non-empty symbol string is supplied","Verify coverage with a single symbol request before batching","Treat EmptyDataError as expected for coverage-less tickers"],"exampleFix":"# before\nawait obb.equity.price_target(provider=\"finviz\", symbol=\"\")  # EmptyDataError\n\n# after\nawait obb.equity.price_target(provider=\"finviz\", symbol=\"AAPL\")","handlingStrategy":"validation","validationCode":"assert query.symbol and query.symbol.strip(), \"symbol is required for finviz price targets\"","typeGuard":null,"tryCatchPattern":"from openbb_core.provider.abstract.errors import EmptyDataError\n\ntry:\n    res = await obb.equity.price_target(provider=\"finviz\", symbol=sym)\nexcept EmptyDataError:\n    res = []  # no coverage for these tickers","preventionTips":["Never pass an empty symbol string","Confirm coverage with one symbol before batch runs"],"tags":["openbb","finviz","empty-data","price-target"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}