# libtmux.neo._is_target_not_found_error

- **Module:** libtmux.neo
- **Package:** libtmux
- **Language:** Python
- **Kind:** function
- **Source:** https://github.com/tmux-python/libtmux/blob/036c521c4b83ce6e434eb50afe2a0d08a6a05e46/src/libtmux/neo.py#L1157
- **Page:** https://libtmux.org/reference/py/libtmux-neo-_is_target_not_found_error/

```
libtmux.neo._is_target_not_found_error(stderr_text: str) -> bool
```

Return True if tmux failed because the ``-t`` target does not exist.

A live tmux server rejects an unknown target with ``can't find <kind>:
<target>`` on stderr (``cmd_find_target`` in tmux's ``cmd-find.c``), for
every object kind and every supported tmux version. Every *other* failure
-- a stopped daemon, a missing socket, a permission error -- says something
else, and stays a :exc:`~libtmux.exc.LibTmuxException`.

This is the mirror image of :func:`libtmux.server._is_daemon_not_up_error`:
together they answer "is the object gone, or is the server gone?" from the
same stderr text.

## Parameters

- `stderr_text` (str) — tmux's stderr, as carried by the raised
:exc:`~libtmux.exc.LibTmuxException`.

## Returns

bool
    True when the object named by ``-t`` does not exist on a reachable
    server.

## Example

```python
>>> from libtmux.neo import _is_target_not_found_error
>>> _is_target_not_found_error("can't find pane: %99")
True
>>> _is_target_not_found_error("can't find window: @99")
True
>>> _is_target_not_found_error("can't find session: $99")
True
```

## Example

A server that isn't there is a different answer:

```python
>>> _is_target_not_found_error("no server running on /tmp/tmux-1000/default")
False
>>> _is_target_not_found_error(
...     "error connecting to /tmp/tmux-1000/nope (No such file or directory)"
... )
False
```
