-
Notifications
You must be signed in to change notification settings - Fork 903
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
[KED-2518] kedro new --starter argument is broken on Windows for python<3.8 #722
Comments
Thank you very much for this really excellent bug report! I have added the issue to our internal tracker. |
Is there an example of how to use the 0.17.2 kedro? The starter repository seems broken, I cannot get the I can't find where the |
Hi @noklam, using 0.17.2 kedro should be very similar to previous versions, and I believe that in general all the starters are working. The issue @Galileo-Galilei brought up is specifically a problem with Windows and Python <3.8. Between 0.17.1 and 0.17.2, |
This does not work for me as After digging into source code, I found that I have to add |
|
This seems strange. I just ran this:
... and all worked ok for me, without needing to change anything. Please can you post exactly what you have in your |
Without running python: 3.8.3
|
It works after running |
It fails to import After running It's bug me that |
OK, I was finally able to debug. It is a silly mistake, I just didn't install I understand it's for backward compatibility, but may it should at least show some log?
|
Hi @noklam, thanks for digging into this and sharing. You make a very good point about not just hiding the |
Thanks for getting back. I have noticed Kedro changed the API in the last few versions. from project context to hooks, then hooks to pipeline registry. Is there some migration guide for what need to be changed? Also, is there a roadmap for Kedro release? As we maintain an internal library that integrate with Kedro, it would be nice to expect potential broken API and plans ahead. |
The release notes should generally explain how to migrate when new versions are released. e.g. this explains the move of pipeline registry. If it's a particularly tricky set of changes then there's sometimes whole sections called "Migration guide" to help out. I definitely appreciate that these sorts of changes can make upgrading kedro more frustrating than it should be though. Sorry! As for a roadmap for kedro releases, I don't think we have such a thing available. However, we do note upcoming deprecations with runtime warnings and also in the release notes, so definitely worth reading that for planning purposes. We were also thinking about holding a session for us to explain to users more about where the framework is going and what changes to expect in the future - @yetudada might be able to comment more 🙂 |
Don't worry! Thanks for open sourcing kedro, it definitely helps to solve some of our problems. :) It would be nice to learn more about where is kedro heading to. |
This will be patched in the next release using the workaround in the Python documentation. |
@noklam the fix about the |
@AntonyMilneQB Awesome! |
Hi everyone, this should be fixed in 0.17.3, released today. As always, feel free to raise a new issue if you encounter problems. Thank you all for your patience and insights! |
I actually think its broken again. I am trying your Spaceflight example and going through the long-guide. "ValueError: Pipeline does not contain named ["preprocess_companies_node"] |
@FranciscoReveriano I think (hope) this will not be a kedro problem now. It should be either because you have not followed the documentation quite right or because the documentation itself isn't quite right. Try doing |
Description
I tried to create a kedro project by running
kedro new
on Windows in a conda environment with python 3.7.10. The command fails with aError: Failed to generate project.
error.The command should work, since the badge in the README claims support for python=3.6, 3.7, 3.8.
After investigation, the error comes from
tempfile
library and the context manager used to create a temporary file in_prompt_user_for_config
https://github.com/quantumblacklabs/kedro/blob/6d9ffaba46ed1e984500a86ff5177327857c74f9/kedro/framework/cli/starters.py#L259-L268
This context manager
__exit__
method calls_rmtree_unsafe
on a read only file. This discussion in the official python issue tracker (msg262584 has the exact same stack trace than me, and msg344037 reference the commit which fixes the issue) show that this is a known bug which has been resolved when python==3.8 was released.I checked and everything works fine with python=3.8 on the same computer. The compatibility with different os and python version seems important to me, especially for enterprise support. For my personal kedro use I can easily upgrade my python version, but in a professional setup I often have to deal with the constraints of the team I work with, and I barely choose if I work on windows/linux and if I can upgrade to a newer python version (a lot of teams are conservative and do not want to upgrade their python version by fear of breaking something in production).
Context
I can't create a new kedro project with
kedro new --starter=pandas-iris
command on Windows with python=3.7.Steps to Reproduce
On a Windows 7 or Windows 10 computer, create a conda environment with python=3.7 and call
kedro new
:Expected Result
The kedro project should be created.
Actual Result
The usual questions are asked, then the message
Error: Failed to generate project.
is displayed and no project is created.Running the command with --verbose flag return the following stacktrace:
This is the very same stacktrace that the one in msg262584 in above link on python issue tracker.
Your Environment
Include as many relevant details about the environment in which you experienced the bug:
pip show kedro
orkedro -V
): 0.17.1python -V
): 3.7.10The text was updated successfully, but these errors were encountered: