jdx/mise · error
cannot contain empty values
Error message
{key} cannot contain empty values What it means
The same string_list helper validates that after parsing, none of the collected values is empty or whitespace-only. An empty entry would produce a meaningless pipx flag (e.g. `--with ''`), so mise rejects the option list.
Solutions
- Remove the empty/whitespace entries from the array
- Quote and fill in values where a placeholder was left blank: `with = ["pytest"]`
- If a value comes from a variable, guard against it expanding to empty
Example fix
# before
[tools]
foo = { source = "pipx", with = ["", "black"] }
# after
[tools]
foo = { source = "pipx", with = ["black"] } Defensive patterns
Strategy: validation
Validate before calling
// Reject empty/whitespace entries before passing options const clean = (xs: string[]) => xs.filter(x => x.trim().length > 0);
Type guard
const hasNoEmpty = (xs: string[]) => xs.every(x => x.trim() !== '');
Prevention
- Trim/filter option lists generated programmatically before writing config
- Check hand-edited arrays for blank entries left by trailing commas
- Regenerate config from templates and inspect the expansion
When it happens
Trigger: Options like `with = ["", "black"]` or `expose = [" "]` — a string in the array that is empty or only whitespace.
Common situations: Trailing commas or blank entries in hand-edited TOML arrays; templating/variable expansion that produced an empty string; programmatic config generation emitting empty items.
Understand the failure class
Background: "must not be empty", "cannot be empty" — required-field validation errors across open-source libraries — this error's family across 41 libraries.
Related errors
- expose must contain named Python package requirements
- agent ' ' `start_calendar_interval. ` must be between and
- agent ' ' `start_calendar_interval` must set at least one…
- agent ' ' `start_calendar_interval` must not be empty
- agent ' ' must set a non-empty `program
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/487504910cd2994b.
Report an issue: GitHub.
Appendix: source
Thrown at src/backend/pipx.rs:93
serde_json::from_str(value)
.map_err(|_| eyre!("{key} must be a string or array of strings"))?
} else {
vec![value.clone()]
}
}
toml::Value::Array(values) => values
.iter()
.map(|value| {
value
.as_str()
.map(str::to_owned)
.ok_or_else(|| eyre!("{key} must be a string or array of strings"))
})
.collect::<Result<Vec<_>>>()?,
_ => bail!("{key} must be a string or array of strings"),
};
if values.iter().any(|value| value.trim().is_empty()) {
bail!("{key} cannot contain empty values");
}
Ok(values)
}
fn with(&self) -> Result<Vec<String>> {
self.string_list("with")
}
fn expose(&self) -> Result<Vec<String>> {
self.string_list("expose")
}
fn exposed_package_names(&self) -> Result<Vec<String>> {
self.expose()?
.into_iter()
.map(|requirement| {
let Some(name) = Self::requirement_package_name(&requirement) else {
bail!("expose must contain named Python package requirements");View on GitHub (pinned to 533346cc37)