{"record":{"id":"280168da6ee05571","repo":"langchain-ai/langgraph","slug":"timeout-must-be-a-non-negative-number","errorCode":null,"errorMessage":"'timeout' must be a non-negative number","messagePattern":"'timeout' must be a non-negative number","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"libs/langgraph/langgraph/_internal/_queue.py","lineNumber":100,"sourceCode":"        The optional 'block' and 'timeout' arguments are ignored, as this method\n        never blocks.  They are provided for compatibility with the Queue class.\n        \"\"\"\n        self._queue.append(item)\n        self._count.release()\n\n    def get(self, block=False, timeout=None):\n        \"\"\"Remove and return an item from the queue.\n\n        If optional args 'block' is true and 'timeout' is None (the default),\n        block if necessary until an item is available. If 'timeout' is\n        a non-negative number, it blocks at most 'timeout' seconds and raises\n        the Empty exception if no item was available within that time.\n        Otherwise ('block' is false), return an item if one is immediately\n        available, else raise the Empty exception ('timeout' is ignored\n        in that case).\n        \"\"\"\n        if timeout is not None and timeout < 0:\n            raise ValueError(\"'timeout' must be a non-negative number\")\n        if not self._count.acquire(block, timeout):\n            raise queue.Empty\n        try:\n            return self._queue.popleft()\n        except IndexError:\n            raise queue.Empty\n\n    def wait(self, block=True, timeout=None):\n        \"\"\"If queue is empty, wait until an item maybe is available,\n        but don't consume it.\n        \"\"\"\n        if timeout is not None and timeout < 0:\n            raise ValueError(\"'timeout' must be a non-negative number\")\n        self._count.wait(block, timeout)\n\n    def empty(self):\n        \"\"\"Return True if the queue is empty, False otherwise (not reliable!).\"\"\"\n        return len(self._queue) == 0","sourceCodeStart":82,"sourceCodeEnd":118,"githubUrl":"https://github.com/langchain-ai/langgraph/blob/38031739e551638e373fb553453256c23feeb41f/libs/langgraph/langgraph/_internal/_queue.py#L82-L118","documentation":"Error \"'timeout' must be a non-negative number\" thrown in langchain-ai/langgraph.","triggerScenarios":"Thrown at libs/langgraph/langgraph/_internal/_queue.py:100 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"38031739e551638e373fb553453256c23feeb41f","analyzedAt":"2026-08-26T18:02:49.312Z","schemaVersion":2},"datasetVersion":"2026-08-26T21:11:00.512Z"}