KedroContextError in empty 'kedro new' project: expected `ConfigLoader` is `NoneType`
See original GitHub issueDescription
My fairly new project runs into kedro.framework.context.context.KedroContextError: Expected an istance of "ConfigLoader", got "NoneType" instead.
I tried to follow the error, and I believe that the Hooks are not loaded yet, however the logger is already trying to use them.
Since I am trying it on my Work station where I don’t have access to github ( I know, kill me pls) I am typing this out and can’t really copy paste long error messages. Sorry.
I proceded to try it with a completely empty project (kedro new, kedro ipython) which runs into the same issue.
Context
In my new Project I have followed the two tutorials https://kedro.readthedocs.io/en/latest/03_tutorial/04_create_pipelines.html https://kedro.readthedocs.io/en/latest/11_tools_integration/01_pyspark.html
only after which I tried ‘kedro run’, which lead to the Issue.
Steps to Reproduce
- kedro --version -> 0.17.1
- kedro new
- kedro ipython
Expected Result
the session should be able to start.
Actual Result
As I said, no copy paste 😦
with KedroSession.create(....
...
conf_logging = self.get_logging_config()
...
return self._get_config_loader().
the Exception raised is in this function where I added one line of debug:
def _get_config_loader(self) -> ConfigLoader:
"""A hook for changing the creation of a ConfigLoader instance.
Returns:
Instance of `ConfigLoader` created by `register_config_loader` hook.
Raises:
KedroContextError: Incorrect ``ConfigLoader`` registered for the project.
"""
conf_root = settings.CONF_ROOT
conf_paths = [
str(self.project_path / conf_root / "base"),
str(self.project_path / conf_root / self.env),
]
hook_manager = get_hook_manager()
config_loader = hook_manager.hook.register_config_loader( # pylint: disable=no-member
conf_paths=conf_paths, env=self.env, extra_params=self._extra_params,
)
# I ADDED THIS:
print(hook_manager.hook.register_config_loader.get_hookimpls()) --- > []
if not isinstance(config_loader, ConfigLoader):
raise KedroContextError(
f"Expected an instance of `ConfigLoader`, "
f"got `{type(config_loader).__name__}` instead."
)
return config_loader
This is why I believe that the hooks are not registered yet.
Your Environment
Include as many relevant details about the environment in which you experienced the bug:
- Kedro version used (
pip show kedroorkedro -V): - Python version used (
python -V): 3.6 - Operating system and version: Linux 3.10.0 on Cloudera Workbench 5.xxx
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (5 by maintainers)

Top Related StackOverflow Question
I added
configure_project(Path(__file__).parent.name)to my main function and works now.Thanks for your help @MerelTheisenQB!
Hi @Spooky-0 , this is a known issue which we will very soon release a fix for. In the meantime we recommend to just roll back to Kedro
0.17.0.