In fact, I have just created a fresh project with kedro 0.17.0, in a brand new conda environment. I did the following steps:
- Create a new conda environment (python=3.8.5) and install kedro 0.17.0
- run ‘kedro new’ to create a new project
- run ‘kedro build-reqs’ and ‘kedro install’ to install the dependencies
- run ‘kedro jupyter notebook’.
The result is the same error message, which is from the trace has a line:
settings = import_module(f"{package_name}.settings")
Clearly something is going wrong when trying to load the project settings?
UPDATE: I have figured out what the issue is! When load_context is called, it does the following check:
if "PYTHONPATH" not in os.environ:
os.environ["PYTHONPATH"] = src_path
However, as my PYTHONPATH is not empty by default on my PC, the new path is not added to the PYTHONPATH at all, so load_context cannot find the project module.
Does anyone know why this check is here? Is there a reason why we need to check to see if the PYTHONPATH is empty - why not append to it if it already exists?