nicolargo/glances · error · HTTPException
Cannot get help view data ({str(e)})
Error message
Cannot get help view data ({str(e)}) What it means
Raised by the Glances REST API when the 'help' pseudo-plugin's view data cannot be retrieved. It is a FastAPI HTTPException returning HTTP 404, with the underlying exception message embedded in parentheses. It indicates the GlancesPluginApi or stats model failed internally while building the help view, not that the route is missing.
Source
Thrown at glances/outputs/glances_restful_api.py:873
access_token = self._jwt_handler.create_access_token(username)
return GlancesJSONResponse(
{
"access_token": access_token,
"token_type": "bearer",
"expires_in": self._jwt_handler.expire_minutes * 60,
}
)
def _api_help(self):
"""Glances API RESTful implementation.
Return the help data or 404 error.
"""
try:
plist = self.stats.get_plugin("help").get_view_data()
except Exception as e:
raise HTTPException(status.HTTP_404_NOT_FOUND, f"Cannot get help view data ({str(e)})")
return GlancesJSONResponse(plist)
def _api_plugins(self):
"""Glances API RESTFul implementation.
@api {get} /api/%s/pluginslist Get plugins list
@apiVersion 2.0
@apiName pluginslist
@apiGroup plugin
@apiSuccess {String[]} Plugins list.
@apiSuccessExample Success-Response:
HTTP/1.1 200 OK
[
"load",
"help",View on GitHub (pinned to a240d8dfb3)
Solutions
- Retry the request after the server has completed its first stats update cycle
- Check server startup logs for plugin loading errors for the 'help' plugin
- Verify you are not disabling internal plugins via --disable-plugin
- Upgrade glances so core and API versions match (pip install -U glances)
Defensive patterns
Strategy: try-catch
Validate before calling
plugins = httpx.get(f'{BASE}/api/4/plugins').json()
if 'help' not in plugins:
print('help view unavailable on this server') Try / catch
try:
r = httpx.get(f'{BASE}/api/4/help', timeout=5)
r.raise_for_status()
help_data = r.json()
except httpx.HTTPStatusError as e:
if e.response.status_code == 404:
log.warning(f'help view unavailable: {e.response.text}')
else:
raise Prevention
- Check /api/4/plugins before requesting help data
- Keep glances core and API versions in sync
When it happens
Trigger: GET /api/4/help (or /api/3/help) when self.stats.get_plugin('help') or get_view_data() raises — e.g., stats model not initialized, plugin not loaded at startup, or a malformed items/view structure in the help plugin.
Common situations: Running the API server with a restricted plugin list (--disable-plugin or --enable-plugin that excludes internal plugins), starting the server while the core stats updater is not ready, or version mismatches between glances core and API layer.
Related errors
- Cannot get plugin {plugin} ({str(e)})
- Cannot get plugin list ({str(e)})
- Cannot get stats ({str(e)})
- Cannot get limits ({str(e)})
- Cannot get views ({str(e)})
AI-assisted analysis of nicolargo/glances@a240d8dfb3 (2026-08-27).
Data as JSON: /api/errors/dd4e8a3b50504214.
Report an issue: GitHub.