{"id":"1c477c298cf0c242","repo":"python-poetry/poetry","slug":"package-name-not-found-1c477c","errorCode":null,"errorMessage":"Package [{name}] not found.","messagePattern":"Package \\[(.+?)\\] not found\\.","errorType":"exception","errorClass":"PackageNotFoundError","httpStatus":null,"severity":"error","filePath":"src/poetry/repositories/single_page_repository.py","lineNumber":21,"sourceCode":"from typing import TYPE_CHECKING\n\nfrom poetry.repositories.exceptions import PackageNotFoundError\nfrom poetry.repositories.legacy_repository import LegacyRepository\nfrom poetry.repositories.link_sources.html import HTMLPage\n\n\nif TYPE_CHECKING:\n    from packaging.utils import NormalizedName\n\n\nclass SinglePageRepository(LegacyRepository):\n    def _get_page(self, name: NormalizedName) -> HTMLPage:\n        \"\"\"\n        Single page repositories only have one page irrespective of endpoint.\n        \"\"\"\n        response = self._get_response(\"\")\n        if not response:\n            raise PackageNotFoundError(f\"Package [{name}] not found.\")\n        return HTMLPage(response.url, response.text)\n","sourceCodeStart":3,"sourceCodeEnd":23,"githubUrl":"https://github.com/python-poetry/poetry/blob/92b74dcfe348d0e01e14d40d6c1fa47a4ee04a54/src/poetry/repositories/single_page_repository.py#L3-L23","documentation":"Raised by SinglePageRepository._get_page when the single listing page returns no response (single_page_repository.py:19-21). A single-page repository serves all packages from one HTML page; if _get_response(\"\") returns None (404/401/403) the repository is unusable and this fires. Inherits from LegacyRepository so it shares the HTTP not-found/auth ambiguity of error 85.","triggerScenarios":"Any package lookup on a SinglePageRepository when the base URL is unreachable, returns 404, or requires missing auth (response None).","commonSituations":"Wrong single-page URL configured; the static page was moved/deleted; auth credentials not supplied for a protected artifact server.","solutions":["Verify the single-page URL is correct and returns an HTML listing in a browser.","Configure auth if the server returns 401/403.","Use a multi-page (Legacy) repository instead if the server is a standard simple index."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"resp = repo._get_response(\"\")\nif resp is None:\n    raise ConnectionError(\n        f\"single-page repository {repo.name} unreachable; check URL and auth\"\n    )","typeGuard":null,"tryCatchPattern":"from poetry.repositories.exceptions import PackageNotFoundError\ntry:\n    page = repo._get_page(name)\nexcept PackageNotFoundError:\n    log.error(\"single-page index %s unavailable or needs auth\", repo.name)\n    raise","preventionTips":["Verify the single-page URL returns a valid HTML listing.","Configure auth if the artifact server is protected.","Prefer a standard multi-page simple index when possible."],"tags":["repository","single-page","package-not-found","auth"],"analyzedSha":"92b74dcfe348d0e01e14d40d6c1fa47a4ee04a54","analyzedAt":"2026-08-04T20:33:34.072Z","schemaVersion":2}