{"record":{"id":"5a2d911d1890eca8","repo":"BerriAI/litellm","slug":"granian-must-be-installed-to-use-run-granian-ru","errorCode":null,"errorMessage":"granian must be installed to use --run_granian. Run `pip install granian` or `pip install 'litellm[proxy]'` (Granian requires Python 3.10+).","messagePattern":"granian must be installed to use --run_granian\\. Run `pip install granian` or `pip install 'litellm\\[proxy\\]'` \\(Granian requires Python 3\\.10\\+\\)\\.","errorType":"exception","errorClass":"ImportError","httpStatus":null,"severity":"error","filePath":"litellm/proxy/proxy_cli.py","lineNumber":1062,"sourceCode":"            debug=debug,\n            detailed_debug=detailed_debug,\n            temperature=temperature,\n            max_tokens=max_tokens,\n            request_timeout=request_timeout,\n            max_budget=max_budget,\n            telemetry=telemetry,\n            drop_params=drop_params,\n            add_function_to_prompt=add_function_to_prompt,\n            headers=headers,\n            save=save,\n            config=config,\n            use_queue=use_queue,\n        )\n        if run_granian:\n            try:\n                import granian  # noqa: F401\n            except ImportError as e:\n                raise ImportError(\n                    \"granian must be installed to use --run_granian. \"\n                    \"Run `pip install granian` or `pip install 'litellm[proxy]'` \"\n                    \"(Granian requires Python 3.10+).\"\n                ) from e\n        else:\n            try:\n                import uvicorn\n            except Exception:\n                raise ImportError(\"uvicorn, gunicorn needs to be imported. Run - `pip install 'litellm[proxy]'`\")\n\n        db_connection_pool_limit = 100\n        # Starts optional due to config fallback checks; guaranteed non-None before use.\n        db_connection_timeout: int | float | None = 60\n        db_connect_timeout: int | float | None = None\n        db_socket_timeout: int | float | None = None\n        db_disable_prepared_statements: bool = False\n        db_extra_connection_params: dict | None = None\n        db_statement_timeout: float | None = None","sourceCodeStart":1044,"sourceCodeEnd":1080,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/proxy_cli.py#L1044-L1080","documentation":"Import guard for the --run_granian flag: 'import granian' raised ImportError because the granian server package is not installed (or Python is < 3.10). The original ImportError is chained; the message names the pip command that supplies it.","triggerScenarios":"Thrown at litellm/proxy/proxy_cli.py:1062 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Install granian: pip install granian (requires Python 3.10+), or omit --run_granian to use uvicorn/gunicorn."],"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"}