{"record":{"id":"48e72a6aa629a04a","repo":"nicolargo/glances","slug":"missing-libs-required-to-run-podman-extension-con","errorCode":null,"errorMessage":"Missing libs required to run Podman Extension (Containers)","messagePattern":"Missing libs required to run Podman Extension \\(Containers\\)","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"glances/plugins/containers/engines/podman.py","lineNumber":288,"sourceCode":"            ior = string_value_to_float(ior_str)\n            iow = string_value_to_float(iow_str)\n        except ValueError as e:\n            self._log_debug(\"Compute BlockIO usage failed\", e)\n            return None\n\n        # Hardcode `time_since_update` to 1 as podman docs don't specify the rate calculation procedure\n        return {\"ior\": ior, \"iow\": iow, \"time_since_update\": 1}\n\n\nclass PodmanExtension:\n    \"\"\"Glances' Containers Plugin's Docker Extension unit\"\"\"\n\n    CONTAINER_ACTIVE_STATUS = [\"running\", \"healthy\", \"paused\"]\n\n    def __init__(self, podman_sock):\n        self.disable = disable_plugin_podman\n        if self.disable:\n            raise Exception(\"Missing libs required to run Podman Extension (Containers)\")\n\n        self.display_error = True\n\n        self.client = None\n        self.ext_name = \"containers (Podman)\"\n        self.podman_sock = podman_sock\n        self.pods_stats_fetcher = None\n        self.container_stats_fetchers = {}\n\n        # Issue #3559: cache the (immutable) image tags per container id to avoid\n        # one inspect_image API call per container on every refresh.\n        self.image_cache = {}\n\n        self.connect()\n\n    def connect(self):\n        \"\"\"Connect to Podman.\"\"\"\n        try:","sourceCodeStart":270,"sourceCodeEnd":306,"githubUrl":"https://github.com/nicolargo/glances/blob/a240d8dfb3105a38b5964357ec21768594b0e83e/glances/plugins/containers/engines/podman.py#L270-L306","documentation":"Raised in the Podman engine's __init__ when disable_plugin_podman signals that the Podman client libraries are unavailable. The engine checks the module-level import result and raises this Exception instead of starting with a half-working client.","triggerScenarios":"Constructing PodmanGlancesContainerExtension(podman_sock=...) without the podman client package installed, or when importing it failed at module import time.","commonSituations":"Installing glances without [podman] extras; trying to monitor Podman on a host where the SDK is absent; broken installs after Python upgrades invalidated site-packages.","solutions":["Install the extra: pip install 'glances[podman]'","Confirm importability: python -c 'import glances.plugins.containers.engines.podman' and read any ImportError","If the socket path is wrong you'll get client errors later — but ensure the lib is present first","Turn off the Podman engine in glances.conf if unused"],"exampleFix":"# before\n$ glances  # Podman engine init fails\n# after\n$ pip install 'glances[podman]'\n$ glances","handlingStrategy":"validation","validationCode":"import importlib.util\nif importlib.util.find_spec('podman') is None:\n    raise SystemExit('install: pip install glances[podman]')","typeGuard":"def podman_engine_available() -> bool:\n    import importlib.util\n    return importlib.util.find_spec('podman') is not None","tryCatchPattern":"try:\n    ext = PodmanGlancesContainerExtension(podman_sock=sock)\nexcept Exception as e:\n    if 'Missing libs' in str(e):\n        ext = None\n    else:\n        raise","preventionTips":["pip install 'glances[podman]'","Reinstall extras after Python version upgrades","Turn off the Podman engine if you don't use Podman"],"tags":["glances","podman","containers","missing-dependency","import-error"],"backgroundTag":"missing-dependency","analyzedSha":"a240d8dfb3105a38b5964357ec21768594b0e83e","analyzedAt":"2026-08-27T19:15:19.178Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}