Skip to content
This repository was archived by the owner on Apr 14, 2026. It is now read-only.
This repository was archived by the owner on Apr 14, 2026. It is now read-only.

Problems with the __main__ file #36

@JnyJny

Description

@JnyJny

if __name__ == "__main__":
dist = distribution("bundlefun")
data_path = dist.locate_file("log-formats.json")
print(type(data_path), data_path)
exit(main())

You are missing an import to make this go:

from importlib.metadata import distribution

if __name__  == "__main__":

     success = True
    dist = distribution("bundlefun")
    path = dist.locate_file(...)
    ...
    return 0 if success else 1

The final line in your code exit(main()) is going to fail since you haven't written a main function to be called.

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