Skip to content

s3-ocr tool missing all of its commands if python3-click OS package (with click v7) is installed #25

@simonw

Description

@simonw

Spotted in this run on GitHub Actions: https://github.com/simonw/sfms-history/runs/7752384568 - as part of:

% s3-ocr --help
Usage: s3-ocr [OPTIONS] COMMAND [ARGS]...

  Tools for running OCR against files stored in S3

Options:
  --version  Show the version and exit.
  --help     Show this message and exit.
% s3-ocr --version
s3-ocr, version 0.6
% s3-ocr index sfms-history index.db
Usage: s3-ocr [OPTIONS] COMMAND [ARGS]...
Try 's3-ocr --help' for help.

Error: No such command 'index'.

Most of this issue is me figuring out exactly what causes the bug - jump to #25 (comment) to skip that and get to the point where I've proven that python3-click OS package is the cause of the bug.

UPDATE: I eventually found that this was due to my code having a bug: I was registering commands with @cli.command when I should have been using @cli.command() - see this issue for details:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions