{"record":{"id":"2d5d9fce552fef89","repo":"OpenBB-finance/OpenBB","slug":"please-enter-a-country-and-frequency","errorCode":null,"errorMessage":"Please enter a country and frequency.","messagePattern":"Please enter a country and frequency\\.","errorType":"validation","errorClass":"OpenBBError","httpStatus":null,"severity":"error","filePath":"openbb_platform/providers/imf/openbb_imf/imf_router.py","lineNumber":707,"sourceCode":"        bool,\n        Query(\n            title=\"Raw Output\",\n            description=\"Return presentation table as raw JSON data if True.\",\n        ),\n    ] = False,\n) -> Any:\n    \"\"\"Get a formatted presentation table from the IMF database. Returns as HTML or JSON list.\"\"\"\n    # pylint: disable=import-outside-toplevel\n    import html as html_module\n\n    from openbb_imf.models.economic_indicators import ImfEconomicIndicatorsFetcher\n    from pandas import DataFrame\n\n    if dataflow_group is None or table is None:\n        raise OpenBBError(ValueError(\"Please enter a dataflow group and a table.\"))\n\n    if country is None or frequency is None:\n        raise OpenBBError(ValueError(\"Please enter a country and frequency.\"))\n\n    freq_map = {\"A\": \"annual\", \"Q\": \"quarter\", \"M\": \"month\", \"D\": \"day\"}\n    symbol = PRESENTATION_TABLES.get(table, \"\")\n    params = {\n        \"symbol\": symbol,\n        \"country\": country,\n        \"limit\": limit,\n        \"frequency\": freq_map.get(frequency, frequency),\n        \"dimension_values\": dimension_values,\n        \"pivot\": True,\n    }\n    results = await ImfEconomicIndicatorsFetcher.fetch_data(params, {})\n    results_json = [d.model_dump(mode=\"json\", exclude_none=True) for d in results.result]  # type: ignore\n\n    if raw is True:\n        return results_json\n\n    df = DataFrame(results_json).set_index([\"title\", \"country\"]).reset_index()","sourceCodeStart":689,"sourceCodeEnd":725,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/providers/imf/openbb_imf/imf_router.py#L689-L725","documentation":"Error \"Please enter a country and frequency.\" thrown in OpenBB-finance/OpenBB.","triggerScenarios":"Thrown at openbb_platform/providers/imf/openbb_imf/imf_router.py:707 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide both a country and a frequency parameter.","Use a valid IMF country code and frequency ('A', 'Q', or 'M')."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}