{"record":{"id":"2f15e3b9e69020ab","repo":"BerriAI/litellm","slug":"failed-to-load-custom-logger-from-remote-url-e","errorCode":null,"errorMessage":"Failed to load custom logger from {remote_url}: {e}","messagePattern":"Failed to load custom logger from (.+?): (.+?)","errorType":"exception","errorClass":"ImportError","httpStatus":null,"severity":"error","filePath":"litellm/proxy/types_utils/utils.py","lineNumber":182,"sourceCode":"            raise ImportError(f\"Could not create module spec for {local_file_path}\")\n\n        module: Final = importlib.util.module_from_spec(spec)\n        spec.loader.exec_module(module)\n\n        # Get the instance\n        instance: Final = getattr(module, instance_name)\n\n        # Clean up the temporary file\n        try:\n            os.remove(local_file_path)\n        except Exception as cleanup_error:\n            verbose_proxy_logger.warning(\"Could not clean up temporary file %s: %s\", local_file_path, cleanup_error)\n\n        verbose_proxy_logger.info(\"Successfully loaded custom logger from %s\", remote_url)\n        return instance\n\n    except Exception as e:\n        raise ImportError(f\"Failed to load custom logger from {remote_url}: {e}\") from e\n\n\nasync def _download_gcs_file_wrapper(bucket_name: str, object_key: str, local_file_path: str) -> bool:\n    \"\"\"Wrapper for GCS download to handle async properly\"\"\"\n    try:\n        from litellm.proxy.common_utils.load_config_utils import (\n            download_python_file_from_gcs,\n        )\n\n        return await download_python_file_from_gcs(bucket_name, object_key, local_file_path)\n    except Exception as e:\n        from litellm._logging import verbose_proxy_logger\n\n        verbose_proxy_logger.error(\"Error downloading from GCS: %s\", e)\n        return False\n\n\ndef validate_custom_validate_return_type(","sourceCodeStart":164,"sourceCodeEnd":200,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/types_utils/utils.py#L164-L200","documentation":"Generic wrapper around the whole remote-module load: download, spec creation, exec_module, or getattr on the instance name failed, or a pre-download validation error propagated. The chained original exception ('{e}') identifies the actual step; raised as ImportError to signal custom-logger load failure.","triggerScenarios":"Thrown at litellm/proxy/types_utils/utils.py:182 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the remote URL format, cloud credentials, and the underlying exception in the logs."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}