badges/shields · error · NotFound

version not specified

Error message

version not specified

What it means

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.

Source

Thrown at services/github/github-pipenv.service.js:89

      defaultLabel: 'python',
      versionFormatter: pep440VersionColor,
    })
  }

  async handle({ user, repo, branch }) {
    const {
      _meta: {
        requires: { python_version: version },
      },
    } = await fetchJsonFromRepo(this, {
      schema: isLockfile,
      user,
      repo,
      branch,
      filename: 'Pipfile.lock',
    })
    if (version === undefined) {
      throw new NotFound({ prettyMessage: 'version not specified' })
    }
    return this.constructor.render({ version, branch })
  }
}

class GithubPipenvLockedDependencyVersion extends ConditionalGithubAuthV3Service {
  static category = 'dependencies'
  static route = {
    base: 'github/pipenv/locked/dependency-version',
    pattern: ':user/:repo/:kind(dev)?/:packageName/:branch*',
  }

  static openApi = {
    '/github/pipenv/locked/dependency-version/{user}/{repo}/{packageName}': {
      get: {
        summary: 'GitHub Pipenv locked dependency version',
        description,
        parameters: pathParams(

View on GitHub (pinned to 766fd8bc89)

Solutions

  1. Add the package to Pipfile.lock via `pipenv install <package>` and commit the lockfile
  2. Check the package name in the badge URL for typos/case
  3. Ensure the package is in the section the badge reads (default vs dev)
  4. Regenerate Pipfile.lock with `pipenv lock` if it is stale

Example fix

// before (Pipfile.lock without 'requests')
/badge/pipenv/v/user/repo/requests -> version not specified
// after
$ pipenv install requests && git commit Pipfile.lock
/badge/pipenv/v/user/repo/requests
Defensive patterns

Strategy: validation

Validate before calling

const lock = require('./Pipfile.lock')
if (!(pkg in lock.default) && !(pkg in lock.develop)) {
  throw new Error(`${pkg} not in Pipfile.lock; run: pipenv install ${pkg}`)
}

Type guard

null

Try / catch

try {
  await fetchPipenvBadge(user, repo, pkg)
} catch (e) {
  if (e.message === 'version not specified') return 'not installed'
  throw e
}

Prevention

When it happens

Trigger: 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).

Common situations: 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.

Related errors


AI-assisted analysis of badges/shields@766fd8bc89 (2026-08-30). Data as JSON: /api/errors/0bcdb75b0bb6d27a. Report an issue: GitHub.