{"record":{"id":"abcdbe1593d2e13e","repo":"headroomlabs-ai/headroom","slug":"openai-package-required-install-with-pip-install-abcdbe","errorCode":null,"errorMessage":"OpenAI package required. Install with: pip install openai","messagePattern":"OpenAI package required\\. Install with: pip install openai","errorType":"exception","errorClass":"ImportError","httpStatus":null,"severity":"error","filePath":"headroom/evals/html_extraction.py","lineNumber":280,"sourceCode":"                client = OpenAI()\n\n                def judge(question: str, ground_truth: str, prediction: str) -> tuple[float, str]:\n                    prompt = HTML_JUDGE_PROMPT.format(\n                        question=question,\n                        ground_truth=ground_truth,\n                        prediction=prediction,\n                    )\n                    response = client.chat.completions.create(\n                        model=self.judge_model,\n                        messages=[{\"role\": \"user\", \"content\": prompt}],\n                        temperature=0.0,\n                        max_tokens=200,\n                    )\n                    return self._parse_judge_response(response.choices[0].message.content or \"\")\n\n                return judge\n            except ImportError:\n                raise ImportError(\n                    \"OpenAI package required. Install with: pip install openai\"\n                ) from None\n\n        elif self.provider == \"anthropic\":\n            try:\n                import anthropic\n\n                anthropic_client = anthropic.Anthropic()\n\n                def judge(question: str, ground_truth: str, prediction: str) -> tuple[float, str]:\n                    prompt = HTML_JUDGE_PROMPT.format(\n                        question=question,\n                        ground_truth=ground_truth,\n                        prediction=prediction,\n                    )\n                    anthropic_response = anthropic_client.messages.create(\n                        model=self.judge_model,\n                        max_tokens=200,","sourceCodeStart":262,"sourceCodeEnd":298,"githubUrl":"https://github.com/headroomlabs-ai/headroom/blob/322425c43bffde1ed0b64fecf3cf5951565dd82b/headroom/evals/html_extraction.py#L262-L298","documentation":"Error \"OpenAI package required. Install with: pip install openai\" thrown in headroomlabs-ai/headroom.","triggerScenarios":"Raised when the HTML extraction eval is configured to use an OpenAI model but the `openai` package is not installed.","commonSituations":"See trigger scenarios.","solutions":["Install the OpenAI package: pip install openai","Or install the evals extra: pip install headroom-ai[evals]"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"322425c43bffde1ed0b64fecf3cf5951565dd82b","analyzedAt":"2026-08-15T01:03:05.481Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}