Skip to content

Companion figure commands discard tracebacks of internal ValueError/OSError (no --verbose) #782

Closed

Description

@iskandr

vaxrank/cli/errors.py::run_reporting_user_errors wraps the companion figure commands (vaxrank-mutation-figure, vaxrank-evidence-figure, vaxrank-complex-result-figure) and turns any OSError/ValueError into one line + exit 1, with traceback_hint=False.

That is right for a missing or malformed input file, but a bug inside generate_mutation_figures / generate_evidence_figures / generate_complex_variant_results that raises ValueError (pandas, matplotlib) is reported the same way, and the traceback is unrecoverable:

  • these parsers define no --verbose, so exit_with_user_error's --verbose check can never fire (argparse rejects the flag first);
  • the logger.debug(..., exc_info=True) record goes to the vaxrank logger, which these commands never configure, so it is dropped;
  • the module docstring promises "the traceback stays recoverable", which is false for these commands.

Fix options: give the companion commands a --verbose (natural place: the shared vaxrank/cli/companion.py helper added for --version in #775), or narrow the catch to input-loading errors only.

Found in review of the CLI-polish stack (#765, #773–#778).

Activity

  1. iskandr commented on Nov 20, 2026

    @iskandr
    ContributorAuthor

    Obsoleted in #894 (v3.61.0): removed the three companion figure commands (vaxrank-mutation-figure, vaxrank-evidence-figure, vaxrank-complex-result-figure) and their visualization modules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions