{"record":{"id":"0bcdb75b0bb6d27a","repo":"badges/shields","slug":"version-not-specified","errorCode":null,"errorMessage":"version not specified","messagePattern":"version not specified","errorType":"exception","errorClass":"NotFound","httpStatus":404,"severity":"error","filePath":"services/github/github-pipenv.service.js","lineNumber":89,"sourceCode":"      defaultLabel: 'python',\n      versionFormatter: pep440VersionColor,\n    })\n  }\n\n  async handle({ user, repo, branch }) {\n    const {\n      _meta: {\n        requires: { python_version: version },\n      },\n    } = await fetchJsonFromRepo(this, {\n      schema: isLockfile,\n      user,\n      repo,\n      branch,\n      filename: 'Pipfile.lock',\n    })\n    if (version === undefined) {\n      throw new NotFound({ prettyMessage: 'version not specified' })\n    }\n    return this.constructor.render({ version, branch })\n  }\n}\n\nclass GithubPipenvLockedDependencyVersion extends ConditionalGithubAuthV3Service {\n  static category = 'dependencies'\n  static route = {\n    base: 'github/pipenv/locked/dependency-version',\n    pattern: ':user/:repo/:kind(dev)?/:packageName/:branch*',\n  }\n\n  static openApi = {\n    '/github/pipenv/locked/dependency-version/{user}/{repo}/{packageName}': {\n      get: {\n        summary: 'GitHub Pipenv locked dependency version',\n        description,\n        parameters: pathParams(","sourceCodeStart":71,"sourceCodeEnd":107,"githubUrl":"https://github.com/badges/shields/blob/766fd8bc89a90b8534dc573ab72dec30215ab1ec/services/github/github-pipenv.service.js#L71-L107","documentation":"The GitHub Pipenv service reads the requested package's version from `Pipfile.lock`. The file is fetched and parsed successfully, but when the package key is absent the lookup yields `undefined`, so the service throws `NotFound` with 'version not specified'. It means the lockfile does not contain that dependency.","triggerScenarios":"Requesting a pipenv dependency badge where the named package is not present in Pipfile.lock (not installed, only a dev/optional entry excluded from the looked-up section, or name spelled differently).","commonSituations":"Dependency removed from the project but badge URL left behind; package name typo or case mismatch; dependency exists only in the dev-packages section while the badge reads the default section; Pipfile.lock not committed/regenerated after adding the dep.","solutions":["Add the package to Pipfile.lock via `pipenv install <package>` and commit the lockfile","Check the package name in the badge URL for typos/case","Ensure the package is in the section the badge reads (default vs dev)","Regenerate Pipfile.lock with `pipenv lock` if it is stale"],"exampleFix":"// before (Pipfile.lock without 'requests')\n/badge/pipenv/v/user/repo/requests -> version not specified\n// after\n$ pipenv install requests && git commit Pipfile.lock\n/badge/pipenv/v/user/repo/requests","handlingStrategy":"validation","validationCode":"const lock = require('./Pipfile.lock')\nif (!(pkg in lock.default) && !(pkg in lock.develop)) {\n  throw new Error(`${pkg} not in Pipfile.lock; run: pipenv install ${pkg}`)\n}","typeGuard":"null","tryCatchPattern":"try {\n  await fetchPipenvBadge(user, repo, pkg)\n} catch (e) {\n  if (e.message === 'version not specified') return 'not installed'\n  throw e\n}","preventionTips":["Run `pipenv lock` and commit Pipfile.lock after every dependency change","Match the package name exactly as it appears in Pipfile.lock","Confirm the package is in the section the badge reads (default vs develop)","Keep badge URLs in sync with the project's actual dependencies"],"tags":["github","pipenv","python","not-found","dependency"],"backgroundTag":"dependency-not-in-lockfile","analyzedSha":"766fd8bc89a90b8534dc573ab72dec30215ab1ec","analyzedAt":"2026-08-30T01:40:27.499Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}