apache/superset · warning · Error
All values must be numeric
Error message
All values must be numeric
What it means
On the versioned language-pack script route (superset/views/core.py:724), the <version> path segment must match ^[0-9a-f]{12}$ — a 12-character lowercase hex content hash (it keys immutable browser caching of script.js). Anything else (short hash, 'latest', uppercase, non-hex) aborts 400 'Invalid language pack version'. The lang check runs before this, so a bad lang yields error 505 instead.
Source
Thrown at superset-frontend/plugins/plugin-chart-echarts/src/utils/controls.ts:34
* specific language governing permissions and limitations
* under the License.
*/
import { validateNumber } from '@superset-ui/core';
export function parseAxisBound(
bound?: string | number | null,
): number | undefined {
if (bound === undefined || bound === null || Number.isNaN(Number(bound))) {
return undefined;
}
return Number(bound);
}
export function parseNumbersList(value: string, delim = ';') {
if (!value?.trim()) return [];
return value.split(delim).map(num => {
if (validateNumber(num)) throw new Error('All values must be numeric');
return Number(num);
});
}
View on GitHub (pinned to f4587218dd)
Solutions
- Obtain the version from get_language_pack_version(lang) (the same helper the server uses) and request exactly that
- Re-fetch the current version whenever translations change instead of caching it indefinitely
- Normalize: lowercase hex, exactly 12 characters
Example fix
# before
url = f"/language_pack/{lang}/latest/script.js" # 400
# after
from superset.utils.language_pack import get_language_pack_version
version = get_language_pack_version(lang)
url = f"/language_pack/{lang}/{version}/script.js" Defensive patterns
Strategy: validation
Validate before calling
import re
def valid_version(v: str) -> bool:
return bool(re.fullmatch(r"[0-9a-f]{12}", v)) Type guard
const isPackVersion = (v: string): boolean => /^[0-9a-f]{12}$/.test(v); Prevention
- Fetch the version from the server's pack metadata (get_language_pack_version) instead of guessing
- Versions are 12-char lowercase hex content hashes — never 'latest', build numbers, or SHA-256 prefixes of other length
When it happens
Trigger: GET /language_pack/pt_BR/v2/script.js, /language_pack/en/ABC123DEF456/script.js (uppercase), a 40-char git-style sha, or an empty version segment; also hardcoding a version string in templates instead of reading the current pack version.
Common situations: Custom HTML templates or reverse-proxy rewrites that pin a version literal; after a Superset upgrade the pack content hash changed and old clients request a version they computed differently; tooling passing the translations file mtime or build number as version.
Related errors
- Please provide both time bounds (Since and Until)
- validation_error
- Unsupported whisker type: ${whiskerOptions}
- Found invalid orderby options
- Unknown Error
AI-assisted analysis of apache/superset@f4587218dd (2026-08-14).
Data as JSON: /api/errors/cf73dca30990789f.
Report an issue: GitHub.