ExceptionsΒΆ

libtmux exceptions.

libtmux.excΒΆ

exception libtmux.exc.LibTmuxException[source]ΒΆ

Base Exception for libtmux Errors.

exception libtmux.exc.DeprecatedError[source]ΒΆ

Raised when a deprecated function, method, or parameter is used.

This exception provides clear guidance on what to use instead.

Parameters:
  • deprecated (str) – The name of the deprecated API (e.g., β€œPane.resize_pane()”)

  • replacement (str) – The recommended replacement API to use instead

  • version (str) – The version when the API was deprecated (e.g., β€œ0.28.0”)

__init__(*, deprecated, replacement, version)[source]ΒΆ
Parameters:
  • deprecated (str)

  • replacement (str)

  • version (str)

Return type:

None

exception libtmux.exc.TmuxSessionExists[source]ΒΆ

Session does not exist in the server.

exception libtmux.exc.TmuxCommandNotFound[source]ΒΆ

Application binary for tmux not found.

exception libtmux.exc.TmuxObjectDoesNotExist[source]ΒΆ

The query returned multiple objects when only one was expected.

__init__(obj_key=None, obj_id=None, list_cmd=None, list_extra_args=None, *args)[source]ΒΆ
Parameters:
  • obj_key (str | None)

  • obj_id (str | None)

  • list_cmd (str | None)

  • list_extra_args (ListExtraArgs | None)

  • args (object)

Return type:

None

exception libtmux.exc.VersionTooLow[source]ΒΆ

Raised if tmux below the minimum version to use libtmux.

exception libtmux.exc.BadSessionName[source]ΒΆ

Disallowed session name for tmux (empty, contains periods or colons).

__init__(reason, session_name=None, *args)[source]ΒΆ
Parameters:
Return type:

None

exception libtmux.exc.OptionError[source]ΒΆ

Root error for any error involving invalid, ambiguous or bad options.

exception libtmux.exc.UnknownOption[source]ΒΆ

Option unknown to tmux show-option(s) or show-window-option(s).

exception libtmux.exc.UnknownColorOption[source]ΒΆ

Unknown color option.

__init__(*args)[source]ΒΆ
Parameters:

args (object)

Return type:

None

exception libtmux.exc.InvalidOption[source]ΒΆ

Option invalid to tmux.

exception libtmux.exc.AmbiguousOption[source]ΒΆ

Option that could potentially match more than one.

exception libtmux.exc.WaitTimeout[source]ΒΆ

Function timed out without meeting condition.

exception libtmux.exc.VariableUnpackingError[source]ΒΆ

Error unpacking variable.

__init__(variable=None, *args)[source]ΒΆ
Parameters:
Return type:

None

exception libtmux.exc.PaneError[source]ΒΆ

Any type of pane related error.

exception libtmux.exc.PaneNotFound[source]ΒΆ

Pane not found.

__init__(pane_id=None, *args)[source]ΒΆ
Parameters:
Return type:

None

exception libtmux.exc.WindowError[source]ΒΆ

Any type of window related error.

exception libtmux.exc.MultipleActiveWindows[source]ΒΆ

Multiple active windows.

__init__(count, *args)[source]ΒΆ
Parameters:
Return type:

None

exception libtmux.exc.NoActiveWindow[source]ΒΆ

No active window found.

__init__(*args)[source]ΒΆ
Parameters:

args (object)

Return type:

None

exception libtmux.exc.NoWindowsExist[source]ΒΆ

No windows exist for object.

__init__(*args)[source]ΒΆ
Parameters:

args (object)

Return type:

None

exception libtmux.exc.AdjustmentDirectionRequiresAdjustment[source]ΒΆ

If adjustment_direction is set, adjustment must be set.

__init__()[source]ΒΆ
Return type:

None

exception libtmux.exc.WindowAdjustmentDirectionRequiresAdjustment[source]ΒΆ

ValueError for libtmux.Window.resize_window().

exception libtmux.exc.PaneAdjustmentDirectionRequiresAdjustment[source]ΒΆ

ValueError for libtmux.Pane.resize_pane().

exception libtmux.exc.RequiresDigitOrPercentage[source]ΒΆ

Requires digit (int or str digit) or a percentage.

__init__()[source]ΒΆ
Return type:

None