kovidgoyal/kitty · warning
Invalid increment specification: {vals[1]}
Error message
Invalid increment specification: {vals[1]} What it means
The second argument to resize_window could not be parsed as an integer; kitty keeps the default increment of 1.
Source
Thrown at kitty/options/utils.py:310
@func_with_args('resize_window')
def resize_window(func: str, rest: str) -> FuncArgsType:
vals = rest.strip().split(maxsplit=1)
if len(vals) > 2:
log_error('resize_window needs one or two arguments, using defaults')
args = ['wider', 1]
else:
quality = vals[0].lower()
if quality not in ('reset', 'taller', 'shorter', 'wider', 'narrower'):
log_error(f'Invalid quality specification: {quality}')
quality = 'wider'
increment = 1
if len(vals) == 2:
try:
increment = int(vals[1])
except Exception:
log_error(f'Invalid increment specification: {vals[1]}')
args = [quality, increment]
return func, args
@func_with_args('move_window')
def move_window(func: str, rest: str) -> FuncArgsType:
rest = rest.lower()
rest = {'up': 'top', 'down': 'bottom'}.get(rest, rest)
prest: int | str = rest
try:
prest = int(prest)
except Exception:
if prest not in ('left', 'right', 'top', 'bottom'):
log_error(f'Invalid move_window specification: {rest}')
prest = 0
return func, [prest]
View on GitHub (pinned to 6d5d0c4406)
Solutions
- Use a plain integer for the increment, e.g. `resize_window wider 3`
- Strip any unit suffixes from the number
Example fix
# before map f1 resize_window wider 2px # after map f1 resize_window wider 2
Defensive patterns
Strategy: validation
Validate before calling
ok = '2'.lstrip('+-').isdigit() Prevention
- Increment must be a bare integer
- Avoid unit suffixes like px/lines
When it happens
Trigger: `map f1 resize_window wider two` — int(vals[1]) raises ValueError, the message reports the offending token.
Common situations: Writing the increment as a word, or including a unit/type suffix like '2px' or '3 rows'.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- resize_window needs one or two arguments, using defaults
- Invalid quality specification: {quality}
- Unknown signal: {rest} ignoring
- Invalid change_font_size specification: {rest}, treating it
- clear_terminal needs two arguments, using defaults
AI-assisted analysis of kovidgoyal/kitty@6d5d0c4406 (2026-08-27).
Data as JSON: /api/errors/ce3d260d505dfb46.
Report an issue: GitHub.