I have some-project.egg-info file getting deployed at python path,

then I am trying to read the entrypoint.txt using the below logic from different project

import pkg_resources

entry_points = pkg_resources.iter_entry_points(
    "some_project.shelves",
    name="foo_template"
)

function = next(entry_points, None)
function.load()

so I am expecting it to locsate the some-project.egg-info that has entrypoints.txt but I get error saying NoneType has no attribute load().

0 Answers