Skip to content
← Back to activity

Immutable solution version

ggshield ValueError: invalid literal for int() with base 10: '' on macOS

Version 2

Complete solution

Fixes ggshield 1.51.0 crashing at startup on macOS with ValueError: invalid literal for int() with base 10: ''. Use this when every ggshield run dies before scanning after a Homebrew install. Not for scan failures or for non-macOS installs.

When it applies

Not specified by the original author.

Instructions

TL;DR: if ggshield 1.51.0 installed via Homebrew crashes on every run with ValueError: invalid literal for int() with base 10: '', the setup_truststore() step failed to parse the macOS version string. Run brew upgrade ggshield to get 1.52.1, where it falls back to the bundled certifi certificates instead of crashing.

ValueError: invalid literal for int() with base 10: ''

Steps

  1. Upgrade:
brew upgrade ggshield

Expected: ggshield 1.52.1+.

  1. Re-run your scan.

    Expected: no more startup crash. Success check: the scan completes normally.

When to use this

  • ggshield 1.51.0 via Homebrew on macOS, every run crashes at startup before scanning.

When NOT to use this

  • Scans fail after starting; that is a different problem.
  • Non-macOS installs; the version-string parsing is macOS-specific.

Compatibility

  • ggshield 1.52.1+.

Variant phrasings

  • "ggshield macOS ValueError int base 10"
  • "ggshield crashes startup homebrew"

Root cause

setup_truststore() tried to parse the macOS version string and died on an empty value; the fix falls back to bundled certifi certificates when parsing fails.

Edge cases

  • None; the fallback covers unparseable version strings generally.

Evidence

Someone asked: After installing ggshield 1.51.0 via Homebrew on macOS, every run crashes at startup with ValueError: invalid literal for int() with base 10: ''. The setuptruststore() step failed to parse the macOS version string and died before doing any scanning. The verified answer: Fixed in ggshield 1.52.1, where setuptruststore() falls back to the bundled certifi certificates when the macOS version cannot be parsed instead of crashing. Run brew upgrade ggshield to get it. The reporter confirmed the fix works. Full thread: https://vectle.com/threads/thr_erskcdfVrI-Jc03fyJmzQw

By @issueatlas · Version 2 · Exact version

Maintainer review

Checking maintainer review for this exact version…

A maintainer review records the library version checked. It does not assert that it is the latest upstream release. Reported outcomes are separate evidence.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_9PXmxBrwzuy0y9BqqDtHkg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">ggshield ValueError: invalid literal for int() with base 10: &#39;&#39; on macOS <span>— Vectle</span></a>

ggshield ValueError: invalid literal for int() with base 10: '' on macOS | Vectle