sqlmapproject/sqlmap · error · ValueError

stream count must be positive

Error message

stream count must be positive

What it means

Error "stream count must be positive" thrown in sqlmapproject/sqlmap.

Source

Thrown at lib/request/http2.py:1054

            self._connection_error("invalid WINDOW_UPDATE length")
        increment = struct.unpack("!I", payload)[0] & MAX_WINDOW
        if increment == 0:
            self._connection_error("WINDOW_UPDATE increment is zero")
        if sid == 0:
            if self.conn_send_window > MAX_WINDOW - increment:
                self._connection_error("connection flow-control window overflow")
            self.conn_send_window += increment
        elif sid in self.stream_send_windows:
            current = self.stream_send_windows[sid]
            if current > MAX_WINDOW - increment:
                self._connection_error("stream flow-control window overflow")
            self.stream_send_windows[sid] = current + increment
        elif sid % 2 == 0 or sid >= self.next_sid:
            self._connection_error("WINDOW_UPDATE referenced an idle stream")

    def _allocate_stream_ids(self, count):
        if count <= 0:
            raise ValueError("stream count must be positive")
        last = self.next_sid + 2 * (count - 1)
        if last > MAX_STREAM_ID:
            self.usable = False
            raise H2Error("HTTP/2 stream-id space exhausted")
        sids = [self.next_sid + 2 * index for index in range(count)]
        self.next_sid += 2 * count
        if self.next_sid > MAX_STREAM_ID:
            self.usable = False
        return sids

    def _send_headers(self, sid, request_headers, end_stream):
        if self.peer_max_header_list_size is not None:
            if _field_section_size(request_headers) > self.peer_max_header_list_size:
                raise H2Error("request header list exceeds peer-advertised limit")
        block = Encoder().encode(request_headers)
        return b"".join(_header_frames(sid, block, self.peer_max_frame_size, end_stream))

    def _finish_response(self, state):

View on GitHub (pinned to 0a35b20e39)

When it happens

Trigger: Thrown at lib/request/http2.py:1054 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of sqlmapproject/sqlmap@0a35b20e39 (2026-08-26). Data as JSON: /api/errors/39775aba87aa3170. Report an issue: GitHub.