question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

kedro pipeline create <package_name> stop working in 0.16.6 version

See original GitHub issue

Description

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

  1. Install kedro 0.16.6
  2. Create a kedro project
  3. 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:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
yetudadacommented, Mar 19, 2021

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.

1reaction
lorenabalancommented, Feb 26, 2021

Hi @hec10r, sadly I’ve not been able to reproduce the issue. I’ve generated a project with 0.16.4, and kedro pipeline create worked with all of 0.16.4, 0.16.5, 0.16.6 versions. kedro pipeline create also 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.

kedro new --starter pandas-iris

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

kedro new --starter pandas-iris --checkout 0.16.4
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found