{"record":{"id":"faa812104fc6f459","repo":"nicolargo/glances","slug":"cannot-get-plugin-list-str-e","errorCode":null,"errorMessage":"Cannot get plugin list ({str(e)})","messagePattern":"Cannot get plugin list \\((.+?)\\)","errorType":"http","errorClass":"HTTPException","httpStatus":404,"severity":"error","filePath":"glances/outputs/glances_restful_api.py","lineNumber":910,"sourceCode":"               \"ip\",\n               \"memswap\",\n               \"processlist\",\n               ...\n            ]\n\n         @apiError Cannot get plugin list.\n\n         @apiErrorExample Error-Response:\n            HTTP/1.1 404 Not Found\n        \"\"\"\n        # Update the stat\n        # TODO: Why ??? Try to comment it\n        # self.__update_stats()\n\n        try:\n            plist = self.plugins_list\n        except Exception as e:\n            raise HTTPException(status.HTTP_404_NOT_FOUND, f\"Cannot get plugin list ({str(e)})\")\n\n        return GlancesJSONResponse(plist)\n\n    @staticmethod\n    def _sanitize_server(server):\n        \"\"\"Return a copy of the server dict without credential-bearing fields.\"\"\"\n        safe = dict(server)\n        safe.pop('password', None)\n        safe.pop('uri', None)\n        return safe\n\n    def _api_servers_list(self):\n        \"\"\"Glances API RESTful implementation.\n\n        Return the JSON representation of the servers list (for browser mode)\n        HTTP/200 if OK\n        \"\"\"\n        # Update the servers list (and the stats for all the servers)","sourceCodeStart":892,"sourceCodeEnd":928,"githubUrl":"https://github.com/nicolargo/glances/blob/a240d8dfb3105a38b5964357ec21768594b0e83e/glances/outputs/glances_restful_api.py#L892-L928","documentation":"Raised when reading the plugin list property of the Glances REST API fails, returned as HTTP 404. The plugins_list property aggregates plugins from the stats model, so this only fires if that internal state is broken. The original exception text is included in the message.","triggerScenarios":"GET /api/4/plugins when self.plugins_list raises — typically when the GlancesStats instance has no loaded plugins or the model was constructed without a proper core.","commonSituations":"API server started with all plugins disabled, a broken plugin crashing the model enumeration at import time, or a corrupted installation.","solutions":["Check server logs for the embedded underlying exception","Start glances without --disable-plugin/--enable-plugin filters and retry","Reinstall/upgrade glances to restore a consistent installation"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"r = httpx.get(f'{BASE}/api/4/plugins')\nassert r.status_code == 200, f'plugin list unavailable: {r.text}'","typeGuard":null,"tryCatchPattern":"try:\n    plugins = httpx.get(f'{BASE}/api/4/plugins').json()\nexcept (httpx.HTTPError, json.JSONDecodeError) as e:\n    plugins = []  # fallback\n    log.warning(f'cannot list plugins: {e}')","preventionTips":["Treat the plugin list as the source of truth before any plugin-scoped call","Monitor server logs if this endpoint starts failing"],"tags":["glances","rest-api","http-404","plugin-list"],"backgroundTag":"http-404-resource-not-found","analyzedSha":"a240d8dfb3105a38b5964357ec21768594b0e83e","analyzedAt":"2026-08-27T19:15:19.178Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}