kedro pipeline create <package_name> stop working in 0.16.6 version
See original GitHub issueDescription
I am trying to create a modular pipeline following this and when I run kedro pipeline create my_package_name I am getting this error:
Traceback (most recent call last):
File "/Users/hector_lopez/anaconda3/envs/acube/bin/kedro", line 8, in <module>
sys.exit(main())
File "/Users/hector_lopez/anaconda3/envs/acube/lib/python3.7/site-packages/kedro/framework/cli/cli.py", line 725, in main
cli_collection()
File "/Users/hector_lopez/anaconda3/envs/acube/lib/python3.7/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/Users/hector_lopez/anaconda3/envs/acube/lib/python3.7/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/Users/hector_lopez/anaconda3/envs/acube/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/hector_lopez/anaconda3/envs/acube/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/hector_lopez/anaconda3/envs/acube/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/hector_lopez/anaconda3/envs/acube/lib/python3.7/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/Users/hector_lopez/anaconda3/envs/acube/lib/python3.7/site-packages/kedro/framework/cli/pipeline.py", line 104, in create_pipeline
package_dir = _get_project_package_dir(context)
File "/Users/hector_lopez/anaconda3/envs/acube/lib/python3.7/site-packages/kedro/framework/cli/pipeline.py", line 503, in _get_project_package_dir
project_package = import_module(context.package_name)
File "/Users/hector_lopez/anaconda3/envs/acube/lib/python3.7/site-packages/kedro/framework/context/context.py", line 298, in package_name
return self.static_data["package_name"]
KeyError: 'package_name'
Context
This works in kedro 0.16.4. If I downgrade my kedro version it will do the job. Is there any reason for this change?
Steps to Reproduce
- Install kedro 0.16.6
- Create a kedro project
- Run
kedro pipeline create <package_name>
Expected Result
Not having an error
Actual Result
An error
Your Environment
Include as many relevant details about the environment in which you experienced the bug:
- Kedro version used: kedro, version 0.16.6
- Python version used: Python 3.7.0
- Operating system and version: macOS Caralina 10.15.7
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
kedro pipeline create <package_name> stop working in 0.16 ...
The problem seems to be that the project was created using an older version of kedro. I tried creating a project using 0.16.6...
Read more >Modular pipelines — Kedro 0.17.6 documentation
In order to make your new pipeline runnable (using the kedro run --pipeline <pipeline_name> CLI command, for example), you need to modify src/<python_package>/ ......
Read more >kedro.framework.cli.pipeline — Kedro 0.17.6 documentation
def _assert_pkg_name_ok(pkg_name: str): """Check that python package name is in line with PEP8 requirements. Args: pkg_name: Candidate Python package name.
Read more >Modular pipelines — Kedro 0.17.4 documentation
You can pull a modular pipeline from a wheel file by executing kedro pipeline pull <package_name> , where <package_name> is either a package...
Read more >Use Kedro with IPython and Jupyter Notebooks/Lab
into Kedro nodes. You need a single CLI command. Here is how it works: Start a Jupyter notebook session: kedro jupyter notebook.
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 @hec10r! It looks like you understood why you had this challenge. We’re going to close this issue but do feel free to re-open it, if required.
Hi @hec10r, sadly I’ve not been able to reproduce the issue. I’ve generated a project with 0.16.4, and
kedro pipeline createworked with all of 0.16.4, 0.16.5, 0.16.6 versions.kedro pipeline createalso works in a project generated with 0.16.6, with 0.16.6 installed.What I think is causing more of the confusion is the way we load starters, if that’s what you’ve used in testing - then I got the same error you mentioned in the comment above.
This now maps the version of the starter with the version of kedro installed locally. In older versions though, this was fetching the latest master version of the starter, which wasn’t guaranteed to work - particularly with older versions of kedro. To make it more robust I recommend running