{"record":{"id":"32200bd03eed25fd","repo":"nautechsystems/nautilus_trader","slug":"pandas-is-required-for-report-generation-install","errorCode":null,"errorMessage":"pandas is required for report generation; install it with `pip install pandas`","messagePattern":"pandas is required for report generation; install it with `pip install pandas`","errorType":"exception","errorClass":"ImportError","httpStatus":null,"severity":"error","filePath":"python/nautilus_trader/analysis/reporter.py","lineNumber":38,"sourceCode":"\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import TYPE_CHECKING\n\nfrom nautilus_trader.model import OrderFilled\n\n\nif TYPE_CHECKING:\n    import pandas as pd\n\n\ndef _require_pandas() -> None:\n    try:\n        import pandas as pd  # noqa: F401 (presence check)\n    except ImportError as e:\n        raise ImportError(\n            \"pandas is required for report generation; install it with `pip install pandas`\",\n        ) from e\n\n\ndef _ns_to_dt(ts: int) -> pd.Timestamp:\n    import pandas as pd\n\n    return pd.Timestamp(ts, tz=\"UTC\")\n\n\nclass ReportProvider:\n    \"\"\"\n    Provides various portfolio analysis reports.\n    \"\"\"\n\n    @staticmethod\n    def generate_orders_report(orders: list) -> pd.DataFrame:\n        _require_pandas()","sourceCodeStart":20,"sourceCodeEnd":56,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/a4b06ed870971b5671d12754ea138a3ab99b1dec/python/nautilus_trader/analysis/reporter.py#L20-L56","documentation":"validate_market_start_time rejects min_market_start_time or max_market_start_time strings that parse_betfair_timestamp cannot parse. The parser accepts RFC 3339 / ISO-8601 strings with time and offset (e.g. \"2021-03-19T12:07:00+10:00\"), because Betfair navigation data returns that format. The error is raised during BetfairDataClientConfig::validate(), before any network activity, and embeds the underlying parse error plus the offending value.","triggerScenarios":"Setting min_market_start_time or max_market_start_time to a non-RFC3339 string such as \"19/03/2026\", \"2026-08-16\" (date without time and offset), or \"Aug 16 2026\"; then calling validate() or starting the data client.","commonSituations":"Copying human-readable dates from the Betfair web UI or a spreadsheet into config; YAML date-only scalars losing time and timezone; locale-formatted dates (DD/MM/YYYY) pasted from local documents.","solutions":["Use a full RFC 3339 timestamp with time and UTC offset, e.g. \"2026-08-16T00:00:00Z\" or \"2026-08-16T00:00:00+01:00\"","Expand date-only boundaries explicitly to midnight with an offset","Generate the strings programmatically with chrono (Utc::now().to_rfc3339()) instead of typing them"],"exampleFix":"// before\n.min_market_start_time(Some(\"2026-09-01\".to_string()))\n\n// after\n.min_market_start_time(Some(\"2026-09-01T00:00:00Z\".to_string()))","handlingStrategy":"validation","validationCode":"let ts = \"2026-09-01T00:00:00Z\";\nchrono::DateTime::parse_from_rfc3339(ts)\n    .map_err(|e| anyhow::anyhow!(\"invalid market start time '{ts}': {e}\"))?;","typeGuard":"fn is_valid_betfair_timestamp(s: &str) -> bool {\n    chrono::DateTime::parse_from_rfc3339(s).is_ok()\n}","tryCatchPattern":null,"preventionTips":["Always include time and UTC offset in min/max_market_start_time values","Generate timestamp strings with chrono (to_rfc3339) instead of typing them","Add a config lint step that RFC 3339-parses every timestamp field"],"tags":["betfair","config","timestamp","rfc3339","validation","rust"],"backgroundTag":"invalid-timestamp-format","analyzedSha":"a4b06ed870971b5671d12754ea138a3ab99b1dec","analyzedAt":"2026-08-16T22:54:50.089Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}