# libtmux.exc.ObjectDoesNotExist

- **Module:** libtmux.exc
- **Package:** libtmux
- **Language:** Python
- **Kind:** exception
- **Source:** https://github.com/tmux-python/libtmux/blob/38e368c11117fb4aeb2f082d552cd4f210eae06a/src/libtmux/exc.py#L153
- **Bases:** [`LibTmuxException`](/en/py/stable/reference/libtmux-exc-libtmuxexception/)
- **Page:** https://libtmux.org/en/py/stable/reference/libtmux-exc-objectdoesnotexist/

A lookup expected one object and matched none.

Raised by :meth:`~libtmux._internal.query_list.QueryList.get` when nothing
matches and no ``default`` was passed.

## Examples

```python
>>> from libtmux import exc
>>> str(exc.ObjectDoesNotExist())
'No objects found'
```

A lookup that named what it wanted says so:

```python
>>> str(exc.ObjectDoesNotExist(query={"pane_id": "%99"}))
"No objects found: pane_id='%99'"
```

It is part of the :exc:`LibTmuxException` hierarchy, so ``except LibTmuxException`` catches it:

```python
>>> issubclass(exc.ObjectDoesNotExist, exc.LibTmuxException)
True
```

## Members

### Other members

- [`__init__`](/en/py/stable/reference/libtmux-exc-objectdoesnotexist-__init__/) (method)

## Inherited members

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