# libtmux.exc.TmuxCommandTimeout

- **Module:** libtmux.exc
- **Package:** libtmux
- **Language:** Python
- **Kind:** exception
- **Source:** https://github.com/tmux-python/libtmux/blob/efdbb5637666b166358772ecc737b3807beab21e/src/libtmux/exc.py#L274
- **Bases:** [`TmuxTransportError`](/en/py/latest/reference/libtmux-exc-tmuxtransporterror/), [`TimeoutError`](https://docs.python.org/3/builtins/exceptions.html#TimeoutError)
- **Page:** https://libtmux.org/en/py/latest/reference/libtmux-exc-tmuxcommandtimeout/

A tmux client invocation exceeded its wall-clock timeout.

The spawned tmux client is killed with ``SIGKILL`` and reaped before this
exception is raised. Commands already accepted by the tmux server, as well
as running panes and the server itself, are not rolled back or stopped.
Environment assignments in the formatted message have their values masked
to ``***`` and control characters escaped onto a single line.

## Examples

```python
>>> from libtmux import exc
>>> err = exc.TmuxCommandTimeout(["tmux", "wait-for", "build-done"], 0.5)
>>> err.argv
('tmux', 'wait-for', 'build-done')
>>> err.cmd
['tmux', 'wait-for', 'build-done']
>>> err.timeout
0.5
>>> str(err)
'tmux command timed out after 0.5s: tmux wait-for build-done'
>>> issubclass(exc.TmuxCommandTimeout, exc.LibTmuxException)
True
>>> issubclass(exc.TmuxCommandTimeout, TimeoutError)
True
```

## Members

### Other members

- [`cmd`](/en/py/latest/reference/libtmux-exc-tmuxcommandtimeout-cmd/) (property): Return :attr:`argv` as a mutable ``list[str]`` copy.
- [`__init__`](/en/py/latest/reference/libtmux-exc-tmuxcommandtimeout-__init__/) (method)
- [`__reduce__`](/en/py/latest/reference/libtmux-exc-tmuxcommandtimeout-__reduce__/) (method): Serialize :attr:`argv` and :attr:`timeout` across worker processes.

## Inherited members

- [`__str__`](/en/py/latest/reference/libtmux-exc-tmuxcommandtimeout-__str__/) (method), inherited from `libtmux.exc.LibTmuxException`: Render with optional ``"<subcommand>: …"`` prefix.
