nicolargo/glances · error · HTTPException
Cannot get plugin list ({str(e)})
Error message
Cannot get plugin list ({str(e)}) What it means
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.
Source
Thrown at glances/outputs/glances_restful_api.py:910
"ip",
"memswap",
"processlist",
...
]
@apiError Cannot get plugin list.
@apiErrorExample Error-Response:
HTTP/1.1 404 Not Found
"""
# Update the stat
# TODO: Why ??? Try to comment it
# self.__update_stats()
try:
plist = self.plugins_list
except Exception as e:
raise HTTPException(status.HTTP_404_NOT_FOUND, f"Cannot get plugin list ({str(e)})")
return GlancesJSONResponse(plist)
@staticmethod
def _sanitize_server(server):
"""Return a copy of the server dict without credential-bearing fields."""
safe = dict(server)
safe.pop('password', None)
safe.pop('uri', None)
return safe
def _api_servers_list(self):
"""Glances API RESTful implementation.
Return the JSON representation of the servers list (for browser mode)
HTTP/200 if OK
"""
# Update the servers list (and the stats for all the servers)View on GitHub (pinned to a240d8dfb3)
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
Defensive patterns
Strategy: try-catch
Validate before calling
r = httpx.get(f'{BASE}/api/4/plugins')
assert r.status_code == 200, f'plugin list unavailable: {r.text}' Try / catch
try:
plugins = httpx.get(f'{BASE}/api/4/plugins').json()
except (httpx.HTTPError, json.JSONDecodeError) as e:
plugins = [] # fallback
log.warning(f'cannot list plugins: {e}') Prevention
- Treat the plugin list as the source of truth before any plugin-scoped call
- Monitor server logs if this endpoint starts failing
When it happens
Trigger: 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.
Common situations: API server started with all plugins disabled, a broken plugin crashing the model enumeration at import time, or a corrupted installation.
Related errors
- Cannot get help view data ({str(e)})
- Cannot get stats ({str(e)})
- Cannot get limits ({str(e)})
- Cannot get views ({str(e)})
- Cannot get plugin {plugin} ({str(e)})
AI-assisted analysis of nicolargo/glances@a240d8dfb3 (2026-08-27).
Data as JSON: /api/errors/faa812104fc6f459.
Report an issue: GitHub.