-
Notifications
You must be signed in to change notification settings - Fork 909
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
UnboundLocalError: cannot access local variable 'pipelines_package' where it is not associated with a value #3847
Comments
Hi @JenspederM, thanks for flagging this issue. Can I ask what your use case is for printing the result of This method has been added to enable auto discovery of pipelines and does some stuff in the back to make sure your project and its modules are discoverable (https://docs.kedro.org/en/stable/nodes_and_pipelines/pipeline_registry.html). It's meant to run as part of a "regular" Kedro flow where it's preceded by certain project setup methods. You can fix your script by calling Let me know if this makes sense! |
Hi @merelcht, Thank you for your reply. I am using Thanks for the suggesting You can see my exact usage right here |
I have been thinking of making a cookiecutter for Kedro as well. Do you think there would be any interest in this? I made the template based on my own experience of running large scale Databricks projects in production with many contributors of varying levels of experience. |
I'd say, regardless of use case, raising an
Of course! When you get to do it, we can promote it on https://github.com/kedro-org/awesome-kedro Also consider exploring https://github.com/copier-org/copier/, a modern alternative to cookiecutter |
The only problem that I haven't really found a solution for is how I would get the workspace host from the users' Databricks config without using the Databricks CLI. |
@astrojuanlu I also looked into the Or does it deserve a greater redesign? IMO global variables can be quite dangerous when used like this, so I would probably advice for redesigning this logic to remove the use of globals. |
Moving this to our Inbox so that we can look at it and it doesn't get lost. |
For the record, I agree |
Description
Error is thrown when trying to print
find_pipelines
from thekedro.framework.project
module.Context
Unable to use find_pipelines
Steps to Reproduce
print(find_pipelines())
to the bottom of thepipeline_regitry.py
filepython ./src/<project>/pipeline_regitry.py
Expected Result
A dict of pipelines.
Actual Result
I get the following error:
Your Environment
pip show kedro
orkedro -V
): kedro, version 0.19.5python -V
): Python 3.12.2 using rye as package managerThe text was updated successfully, but these errors were encountered: