{"record":{"id":"2596d2e70a0a062b","repo":"badges/shields","slug":"name-versions-are-missing-for-packagename","errorCode":null,"errorMessage":"${name} versions are missing for ${packageName}","messagePattern":"(.+?) versions are missing for (.+?)","errorType":"exception","errorClass":"InvalidResponse","httpStatus":null,"severity":"error","filePath":"services/pypi/pypi-framework-versions.service.js","lineNumber":97,"sourceCode":"      label,\n      message: sortPypiVersions(versions).join(' | '),\n      color: 'blue',\n    }\n  }\n\n  async handle({ frameworkName, packageName }, { pypiBaseUrl }) {\n    const classifier = frameworkNameMap[frameworkName]\n      ? frameworkNameMap[frameworkName].classifier\n      : frameworkName\n    const name = frameworkNameMap[frameworkName]\n      ? frameworkNameMap[frameworkName].name\n      : frameworkName\n    const regex = new RegExp(`^Framework :: ${classifier} :: ([\\\\d.]+)$`)\n    const packageData = await this.fetch({ egg: packageName, pypiBaseUrl })\n    const versions = parseClassifiers(packageData, regex)\n\n    if (versions.length === 0) {\n      throw new InvalidResponse({\n        prettyMessage: `${name} versions are missing for ${packageName}`,\n      })\n    }\n\n    return this.constructor.render({ name, versions })\n  }\n}\n","sourceCodeStart":79,"sourceCodeEnd":105,"githubUrl":"https://github.com/badges/shields/blob/766fd8bc89a90b8534dc573ab72dec30215ab1ec/services/pypi/pypi-framework-versions.service.js#L79-L105","documentation":"The PyPI framework-versions badge throws InvalidResponse when, after fetching the package metadata, no trove classifiers match the `Framework :: <Name> :: <version>` regex — meaning the parsed versions list is empty. It indicates the package (or PyPI response) declares no framework version classifiers for the requested framework.","triggerScenarios":"Requesting e.g. /pypi/frameworkversions/django/<pkg> for a package that has no `Framework :: Django :: x.y` classifiers; a typo'd framework name; a package whose latest release dropped the classifiers.","commonSituations":"Package authors removing classifiers in a new release; users confusing package name with framework name; PyPI classifier format changes breaking the regex.","solutions":["Check the package's PyPI page for 'Framework :: X :: version' classifiers and confirm the framework name matches","Verify the packageName is the PyPI package that declares those classifiers","Add the appropriate Framework classifiers to setup.cfg/setup.py and publish a release"],"exampleFix":"// before\nsetup(..., classifiers=[])  # no Framework:: classifiers\n// after\nclassifiers=[\"Framework :: Django\", \"Framework :: Django :: 4.2\"]","handlingStrategy":"try-catch","validationCode":"const meta = await fetch(`https://pypi.org/pypi/${packageName}/json`)\nconst data = await meta.json()\nconst has = (data.info?.classifiers ?? []).some(c => c.startsWith(`Framework :: ${framework}`))\nif (!has) throw new Error(`${packageName} declares no Framework :: ${framework} classifiers`)","typeGuard":"function hasFrameworkVersions(data, framework) {\n  return Array.isArray(data?.info?.classifiers) &&\n    data.info.classifiers.some(c => new RegExp(`^Framework :: ${framework} :: [\\\\d.]+$`).test(c))\n}","tryCatchPattern":"try {\n  const badge = await service.handle({ framework: 'django', packageName: 'my-django-app' })\n} catch (err) {\n  if (err instanceof InvalidResponse && /versions are missing/.test(err.prettyMessage)) {\n    return renderBadge({ label: 'django', message: 'n/a' })\n  }\n  throw err\n}","preventionTips":["Add Framework :: X :: version classifiers to your package metadata before publishing","Verify the package's PyPI classifiers page before wiring the badge","Keep the badge's framework name aligned with the trove classifier spelling"],"tags":["badge","pypi","empty-data"],"backgroundTag":"missing-upstream-metadata","analyzedSha":"766fd8bc89a90b8534dc573ab72dec30215ab1ec","analyzedAt":"2026-08-30T01:40:27.499Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}