"Hello world" example from the docs doesn't work on Kedro 0.18
See original GitHub issueDescription
Following “Hello World” example from the docs on Kedro 0.18.0 fails with missing 1 required positional argument: 'hook_manager' for runner.run()
Context
Completing quickstart tutorial
Steps to Reproduce
pip install kedro==0.18.0- Follow https://kedro.readthedocs.io/en/0.18.0/get_started/hello_kedro.html#hello-kedro
Expected Result
This is how it behaves on 0.17.7:
$ python hello_kedro.py
/opt/conda/envs/kedro-new/lib/python3.8/site-packages/kedro/io/data_catalog.py:189: DeprecationWarning: The transformer API will be deprecated in Kedro 0.18.0.Please use Dataset Hooks to customise the load and save methods.For more information, please visithttps://kedro.readthedocs.io/en/stable/07_extend_kedro/02_hooks.html
warnings.warn(
{'my_message': 'Hello Kedro!'}
Actual Result
On 0.18.0:
$ python hello_kedro.py
Traceback (most recent call last):
File "hello_kedro.py", line 32, in <module>
print(runner.run(greeting_pipeline, data_catalog))
TypeError: run() missing 1 required positional argument: 'hook_manager'
Your Environment
- Kedro version used (
pip show kedroorkedro -V): 0.18.0 - Python version used (
python -V): 3.8.13 - Operating system and version: Ubuntu 21.10
Issue Analytics
- State:
- Created a year ago
- Reactions:3
- Comments:7 (5 by maintainers)
Top Results From Across the Web
A “Hello World” example — Kedro 0.18.1 documentation
A node is a Kedro concept. It is a wrapper for a Python function that names the inputs and outputs of that function....
Read more >A “Hello World” example — Kedro 0.18.3 documentation
A node is a Kedro concept. It is a wrapper for a Python function that names the inputs and outputs of that function....
Read more >Kedro concepts — Kedro 0.18.4 documentation - Read the Docs
A pipeline organises the dependencies and execution order of a collection of nodes and connects inputs and outputs while keeping your code modular....
Read more >Kedro starters — Kedro 0.18.3 documentation
Kedro starters are used to create projects that contain code to run as-is, or to adapt and extend. They provide pre-defined example code...
Read more >Set up the spaceflights project — Kedro 0.18.0 documentation
Install dependencies. Configure the project. Create a new project¶. Navigate to your chosen working directory and run the following to create ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Hi @szczeles, I tried this on the hello kedro example in order to solve the issue, I’m not sure that is the right solution but its works for me
Please read the Breaking changes to the API section on the release https://github.com/kedro-org/kedro/releases/tag/0.18.0
I added this to the hello world example code:
Please, give me a feedback, thanks
Just for the purposes of getting a running tutorial, I’d recommend using
_create_hook_manager(which is what’s called insideKedroSession) as the least bad option:(Solution courtesy of @noklam)
The minor advantage of this compared to what @sebaxtian suggests is that you don’t need to create a
KedroSession.However, this is obviously a horrible solution and we will figure out a better one. Basically calling
runner.runis a very unusual thing to do - we only do it in this Hello world tutorial, and in general you would programatically call a kedro run usingsession.runlike this. When we made the changes to 0.18 we didn’t realise that this would make callingrunner.runin the Hello world tutorial so much more awkward and ugly, sorry!