{"record":{"id":"523339c62905cc98","repo":"nautechsystems/nautilus_trader","slug":"module-name-r-has-no-attribute-name-r","errorCode":null,"errorMessage":"module {__name__!r} has no attribute {name!r}","messagePattern":"module (.+?) has no attribute (.+?)","errorType":"exception","errorClass":"AttributeError","httpStatus":null,"severity":"error","filePath":"python/nautilus_trader/testkit/providers.py","lineNumber":93,"sourceCode":"    \"https://raw.githubusercontent.com/nautechsystems/nautilus_trader/{branch}/test_data/{path}\"\n)\n_DEFAULT_BRANCH = \"develop\"\n\n\ndef __getattr__(name: str) -> Any:\n    # Lazily re-export the data loaders (which require pandas) so that the\n    # instrument factories remain importable without pandas installed\n    if name in (\n        \"CSVBarDataLoader\",\n        \"CSVTickDataLoader\",\n        \"ParquetBarDataLoader\",\n        \"ParquetTickDataLoader\",\n    ):\n        from nautilus_trader.persistence import loaders\n\n        return getattr(loaders, name)\n\n    raise AttributeError(f\"module {__name__!r} has no attribute {name!r}\")\n\n\ndef _read_test_data(path: str, branch: str = _DEFAULT_BRANCH) -> bytes:\n    if TEST_DATA_DIR.exists():\n        return (TEST_DATA_DIR / path).read_bytes()\n\n    url = _GITHUB_RAW_URL.format(branch=branch, path=path)\n    with urllib.request.urlopen(url) as response:  # noqa: S310  # Fixed https scheme\n        return response.read()\n\n\ndef _open_test_data_text(path: str) -> io.StringIO:\n    return io.StringIO(_read_test_data(path).decode(\"utf-8\"))\n\n\ndef _parse_iso_to_ns(value: str) -> int:\n    s = value.strip()\n    if \"+\" not in s and not s.endswith(\"Z\"):","sourceCodeStart":75,"sourceCodeEnd":111,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/python/nautilus_trader/testkit/providers.py#L75-L111","documentation":"Module-level __getattr__ in the testkit providers lazily re-exports only the four pandas-dependent loaders (CSVBarDataLoader, CSVTickDataLoader, ParquetBarDataLoader, ParquetTickDataLoader); any other unresolved attribute name falls through to this standard AttributeError sentinel.","triggerScenarios":"Thrown at python/nautilus_trader/testkit/providers.py:93 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the attribute spelling against the testkit module contents","Import the data loaders directly from nautilus_trader.persistence.loaders"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"18893faf8b356be3320add8de2f861b0b647cf06","analyzedAt":"2026-09-08T20:49:34.690Z","contentChangedAt":"2026-09-08T20:49:34.690Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}