# libtmux.Pane.refresh

- **Module:** libtmux.Pane
- **Package:** libtmux
- **Language:** Python
- **Kind:** method
- **Source:** https://github.com/tmux-python/libtmux/blob/036c521c4b83ce6e434eb50afe2a0d08a6a05e46/src/libtmux/pane.py#L150
- **Page:** https://libtmux.org/reference/py/libtmux-pane-refresh/

```
libtmux.Pane.refresh(self) -> None
```

Refresh pane attributes from tmux.

Scoped to this pane's own window (``list-panes -t %ID``), so tmux --
not libtmux -- decides which session the pane belongs to. See
:meth:`Pane.from_pane_id`.

## Raises

- `ValueError` — When ``pane_id`` is unset. Surfaces a clear error under
``python -O``, where an ``assert`` would be stripped.
- `TmuxObjectDoesNotExist` — When the pane no longer exists.
- `LibTmuxException` — When tmux itself is unreachable.

## Example

```python
>>> pane.refresh()
>>> pane.pane_id
'%1'
```
