exo-explore/exo · error · ValueError

max_buffer_size must be either an integer or math.inf. 0-siz

Error message

max_buffer_size must be either an integer or math.inf. 0-sized buffers are not supported by multiprocessing

What it means

Error "max_buffer_size must be either an integer or math.inf. 0-sized buffers are not supported by multiprocessing" thrown in exo-explore/exo.

Source

Thrown at src/exo/utils/channels.py:452

        if max_buffer_size != inf and not isinstance(max_buffer_size, int):
            raise ValueError("max_buffer_size must be either an integer or math.inf")
        state = AnyioState[T](max_buffer_size)
        return Sender(state, error_override_config), Receiver(
            state, error_override_config
        )


class mp_channel[T]:  # noqa: N801
    """Create a pair of synchronous channels for interprocess communication"""

    # max buffer size uses math.inf to represent an unbounded queue, and 0 to represent a yet unimplemented "unbuffered" queue.
    def __new__(cls, max_buffer_size: float = inf) -> tuple[MpSender[T], MpReceiver[T]]:
        if (
            max_buffer_size == 0
            or max_buffer_size != inf
            and not isinstance(max_buffer_size, int)
        ):
            raise ValueError(
                "max_buffer_size must be either an integer or math.inf. 0-sized buffers are not supported by multiprocessing"
            )
        state = MpState[T](max_buffer_size)
        return MpSender(_state=state), MpReceiver(_state=state)

View on GitHub (pinned to 21a54c5ea0)

When it happens

Trigger: Thrown at src/exo/utils/channels.py:452 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of exo-explore/exo@21a54c5ea0 (2026-08-26). Data as JSON: /api/errors/a5922284a77a62c2. Report an issue: GitHub.