# libtmux.Window.refresh

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

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

Refresh window attributes from tmux.

Scoped to this window's own session (``list-windows -t @ID``), so tmux
-- not libtmux -- decides which session the window belongs to. See
:meth:`Window.from_window_id`.

## Raises

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

## Example

```python
>>> window.refresh()
>>> window.window_id
'@1'
```
