Will It Vibe logoWill It Vibe?
PY-001Medium severity-8 points

Bare except clause

Part of Code Quality & Syntax, which counts for 20% of the overall score. When this check fires it deducts 8 points from that category, once per scan, no matter how many places it turns up.

What it detects

A bare except: catches every exception, including SystemExit and KeyboardInterrupt, hiding real bugs behind an unrelated failure path.

Why it matters

A bare except: catches every exception, including SystemExit, KeyboardInterrupt, and MemoryError, so it can swallow the signal that would normally stop the program (Ctrl-C) or hide a real bug behind an unrelated failure path. It also makes debugging much harder because the original exception type and message disappear silently. This is one of the first things a Python linter (flake8 E722) flags, because it almost always hides a mistake rather than handling one.

How to fix it

Replace the bare except: with the specific exception type or types the code actually expects, such as except (OSError, ValueError) as exc:. If you truly need a catch-all at a process boundary (a worker loop, a plugin hook), use except Exception: instead of bare except: so KeyboardInterrupt and SystemExit still propagate, and log the exception before continuing.

The paid report includes a ready-to-paste prompt for your AI coding agent for every check it finds, pointed at the exact findings from your scan. See pricing

Does your repo trip this check?

Paste a GitHub URL or drop a project folder. Scans run in your browser and take seconds.

Scan your repo

Related Code Quality & Syntax checks