{"record":{"id":"4c8840a02087ec6c","repo":"OpenBB-finance/OpenBB","slug":"no-data-was-returned-for-any-symbol","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/equity_profile.py","lineNumber":226,"sourceCode":"                        else None\n                    ),\n                    \"long_description\": description if description else None,\n                }\n            )\n\n            return result\n\n        symbols = query.symbol.split(\",\")\n        for symbol in symbols:\n            result = get_one(symbol)\n            if result is not None and result:\n                results.append(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: FinvizEquityProfileQueryParams,\n        data: list[dict],\n        **kwargs: Any,\n    ) -> list[FinvizEquityProfileData]:\n        \"\"\"Transform and validate the raw data.\"\"\"\n        return [FinvizEquityProfileData.model_validate(d) for d in data]\n","sourceCodeStart":208,"sourceCodeEnd":242,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/providers/finviz/openbb_finviz/models/equity_profile.py#L208-L242","documentation":"Finviz equity profile fetcher raises EmptyDataError('No data was returned for any symbol') after iterating every symbol in the comma-separated query. Each per-symbol attempt returned neither a result nor an error message collected in `messages`, so the provider cannot distinguish 'bad symbol' from 'no data' and reports an empty dataset.","triggerScenarios":"Passing a symbols string where none of the tickers resolve on Finviz (e.g. 'FOOBAR,INVALID'); all symbols returning empty profile rows; symbols with whitespace or exchange suffixes (e.g. 'BRK.B') that Finviz rejects silently.","commonSituations":"Batch jobs feeding unvalidated ticker lists from a database; using non-US or delisted tickers against a US-screener-only data source; trailing commas producing empty symbol strings.","solutions":["Test each symbol individually to identify which ones return nothing","Strip whitespace and drop empty entries from the comma-separated symbol string before querying","Use Finviz-recognized tickers (no exchange suffixes, no dots where Finviz expects dashes)","If partial results are acceptable, split the request per symbol and skip the empties"],"exampleFix":"# before\nresult = await obb.equity.profile(symbol=\"FOO,BAR,ZZZZZZ\")  # all invalid -> EmptyDataError\n\n# after\nraw = \"FOO,BAR,ZZZZZZ\"\nsymbols = \",\".join(s.strip() for s in raw.split(\",\") if s.strip())\nresult = await obb.equity.profile(symbol=symbols)","handlingStrategy":"validation","validationCode":"def clean_symbols(raw: str) -> str:\n    return \",\".join(s.strip() for s in raw.split(\",\") if s.strip())\n\nsymbols = clean_symbols(query_symbol)\nassert symbols, \"symbol string is empty after cleaning\"","typeGuard":"def is_finviz_symbol_list(s: str) -> bool:\n    parts = [p for p in s.split(\",\") if p.strip()]\n    return len(parts) > 0 and all(p.strip().isascii() and 1 <= len(p.strip()) <= 6 for p in parts)","tryCatchPattern":"from openbb_core.provider.abstract.errors import EmptyDataError\n\ntry:\n    profiles = await FinvizEquityProfileFetcher.transform_query(...)\nexcept EmptyDataError:\n    profiles = []  # none of the tickers resolved on Finviz","preventionTips":["Validate tickers exist on Finviz before batch profile pulls","Strip whitespace and drop empty entries from comma-separated symbol strings","Query one symbol first to confirm coverage before batching"],"tags":["openbb","finviz","empty-data","symbol-validation"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}