{"record":{"id":"ab2baf644c0b1dfa","repo":"aosabook/500lines","slug":"could-not-dispatch-the-test-s","errorCode":null,"errorMessage":"Could not dispatch the test: %s","messagePattern":"Could not dispatch the test: (.+?)","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"ci/code/repo_observer.py","lineNumber":59,"sourceCode":"            # great, we have a change! let's execute the tests\n            # First, check the status of the dispatcher server to see\n            # if we can send the tests\n            try:\n                response = helpers.communicate(dispatcher_host,\n                                               int(dispatcher_port),\n                                               \"status\")\n            except socket.error as e:\n                raise Exception(\"Could not communicate with dispatcher server: %s\" % e)\n            if response == \"OK\":\n                # Dispatcher is present, let's send it a test\n                commit = \"\"\n                with open(\".commit_id\", \"r\") as f:\n                    commit = f.readline()\n                response = helpers.communicate(dispatcher_host,\n                                               int(dispatcher_port),\n                                               \"dispatch:%s\" % commit)\n                if response != \"OK\":\n                    raise Exception(\"Could not dispatch the test: %s\" %\n                    response)\n                print \"dispatched!\"\n            else:\n                # Something wrong happened to the dispatcher\n                raise Exception(\"Could not dispatch the test: %s\" %\n                response)\n        time.sleep(5)\n\n\nif __name__ == \"__main__\":\n    poll()\n","sourceCodeStart":41,"sourceCodeEnd":71,"githubUrl":"https://github.com/aosabook/500lines/blob/fba689d101eb5600f5c8f4d7fd79912498e950e2/ci/code/repo_observer.py#L41-L71","documentation":"Error \"Could not dispatch the test: %s\" thrown in aosabook/500lines.","triggerScenarios":"Thrown at ci/code/repo_observer.py:59 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Make sure the commit id sent is a valid, non-empty commit hash.","Check the dispatcher server logs to see why it rejected the dispatch request (e.g. no idle test runners).","Start at least one test_runner connected to the dispatcher so it can accept jobs."],"exampleFix":"python test_runner.py --dispatcher-server localhost:8888 &  # register a runner so the dispatcher returns OK to dispatch:<commit>","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fba689d101eb5600f5c8f4d7fd79912498e950e2","analyzedAt":"2026-08-13T06:26:32.792Z","schemaVersion":2},"datasetVersion":"2026-08-13T09:17:06.757Z"}