Skip to content

python -m dapper fails — missing __main__.py module #7

@RoryGlenn

Description

@RoryGlenn

Description

Running python -m dapper --help fails because the package is missing a __main__.py entry point:

(.venv) $ python -m dapper --help
/Users/roryglenn/Repos/medical_claims/.venv/bin/python: No module named dapper.__main__; 'dapper' is a package and cannot be directly executed

Steps to Reproduce

  1. Create a virtual environment and activate it
  2. pip install dapper
  3. python -m dapper --help

Environment

Detail Value
dapper version 1.7.3
Python version 3.14.3
pip version 26.0
OS macOS 26.3.1 (Build 25D2128)
Architecture arm64 (Apple Silicon)
Install method pip install dapper inside a venv
venv location .venv/lib/python3.14/site-packages

Installed dependencies (from pip show dapper)

colorama, dill, ipdb, ipython, matplotlib, mpl-tools, notebook, numpy, pathos, patlib, pyyaml, scipy, setuptools, struct-tools, tabulate, threadpoolctl, tqdm

Expected Behaviour

python -m dapper --help should display a help/usage message, or at minimum a friendly error explaining the correct CLI entry point.

Root Cause

The dapper package directory does not contain a __main__.py file, so Python's -m flag cannot execute it as a runnable package (see PEP 338).

Suggested Fix

Add a dapper/__main__.py that delegates to the appropriate CLI entry point, e.g.:

"""Allow `python -m dapper` to work."""
from dapper.cli import main  # adjust import to actual entry point

if __name__ == "__main__":
    main()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions