-
Notifications
You must be signed in to change notification settings - Fork 906
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Investigate KedroSession.create: ModuleNotFoundError: No module named 'None'
#1583
Comments
Can you post your settings.py it looks like fails on the validate settings part? |
Did you have your "package" actually installed? Does
|
This runs just fine, but having metadata.package_name being the same as the '<package_name>' |
Given that the alternative posted works, i doubt the settings.py is of interest. Besides, the file is as is after creating a file with 'kedro new'. |
@PetervanHeck As you said, the package name is exactly the same. I think the problem here is you didn't have your package installed so when you do The reason why 2nd approach work is Approach 1 should work as long as you did |
Why would i need to 'install' my Kedro package in order to run it as a session? In the previous versions this work and thus i used it in for example my testing to validate input and output still matched. Is there another better method to run the Kedro pipeline? |
@PetervanHeck Ah, so you are suggesting it works in 0.17.x and only breaks in 0.18.x? If that's the case I can look into it. Would be great if you can provide which version of Kedro works and are you running this from the project directory? |
That's indeed the case. I've got it running in for example 0.17.4, 0.17.5 and 0.17.7. |
@PetervanHeck Thanks. From my testing with (Noted my working directory is called 0.17.7
0.18.1
I'll update the issue description a little bit. |
This is just a note for internal use, please ignore this comment For backlog grooming:
|
Dear Noklam, Sorry for the late reply, i completely missed the request for the examples. I think the first error comes due to something i forgot to mention: adding 'src' to the path. Enclosed two projects, one for 17.7, one for 18.1 which replicate my problem. For both projects I did the same:
|
To do:
|
KedroSession.create: ModuleNotFoundError: No module named 'None'
Development Note: if package_name is not None:
configure_project(package_name) Since the global During the investigation, I looked into how CC @AntonyMilneQB Does kedro/kedro/extras/extensions/ipython.py Lines 57 to 64 in e135f6a
|
@noklam Nice investigating! Great question about the difference between
This should become a bit clearer when I finally get around to continuing work on #1423. |
Suggestion - change these to be more explicit?
wdyt? |
Would definitely be good to have clearer names in principle, but the |
@noklam @AntonyMilneQB As after installing wheel file i don't get pyproject.toml file in the installed distribution and i get below error Also my cwd(current working directory) will be the project were i am importing installed wheel (built using kedro package) |
Is this link helpful? If you still have issue, feel free to ask in our Discord channel or open a new issue. |
Description
Following the documentation on creating and running a session causes an error:
https://kedro.readthedocs.io/en/0.18.1/kedro.framework.session.session.KedroSession.html
When creating a KedroSession, the
validate_settings()
appears not to get the right 'PACKAGE_NAME', and thus fails.However, following the following page does work:
https://kedro.readthedocs.io/en/stable/kedro_project_setup/session.html
Context
Starting a Kedro session from within Python.
Steps to Reproduce
Expected Result
Running the kedro project similarly to 'kedro run'
Actual Result
Your Environment
Include as many relevant details about the environment in which you experienced the bug:
pip show kedro
orkedro -V
): 0.18.0 and 0.18.1python -V
): 3.7.9The text was updated successfully, but these errors were encountered: