Reputation: 3625
mod = importlib.import_module('mortgagecomparison')
inspect.getsourcefile(mod)
Yields:
TypeError: <module 'mortgagecomparison' (namespace)> is a built-in module
But the module is not built-in, it's made by me, then installed a pip install -e .
.
Upvotes: 0
Views: 969
Reputation: 28683
In the message:
module 'mortgagecomparison' (namespace)
indicates that this is not an imported module or package, just a directory name, presumably without an __init__.py
Upvotes: 3