I'm getting an unforseen error - `*ValueError:* So...
# questions
s
I'm getting an unforseen error -
*ValueError:* Source path '/Users/user_name/Desktop/science_projects/project_name/src' has to be relative to your project0root '.'
I've tried adding the following but not sure why it is giving this error.
Copy code
project_path = bootstrap_project(
        "."
    )
My project directory structure is standard -
Copy code
/Users/user_name/Desktop/science_projects/project_name/
├── conf/
│   ├── base/
│   │   ├── catalog.yml
│   │   ├── parameters.yml
│   └── local/
├── data/
├── logs/
├── notebooks/
├── src/
│   ├── project_name/
│   │   ├── __init__.py
│   │   ├── pipelines/
│   │   │   ├── recommendation_pipeline/
│   │   │   │   ├── __init__.py
│   │   │   │   ├── nodes.py
│   │   │   │   ├── pipeline.py
│   └── other_modules/
├── pyproject.toml
├── setup.py
└── README.md
l
Hi Shubham, could you give a little more context on where you’re receiving this error? What exactly are you trying to do when you get it?
s
I am trying to run my kedro pipeline node. While the pipeline gets created successfully and loads the datacatalog, I get this error when executing the node.
Copy code
INFO    Loading data from params:sample_size (MemoryDataset)...      data_catalog.py:483
          INFO    Running node: evaluate_sample_data_node:                 node.py:340
                evaluate_models([params:model_name;params:train_start_date;params:train_e       
                nd_date;params:sample_size]) -> [sample_evaluation_results]              
          ERROR   Node evaluate_sample_data_node: evaluate_models() -> failed with error: node.py:365
                Source path '/Users/shubham/Desktop/science_projects/project_name/src' has        
                to be relative to your project root '.'.                       
          WARNING  No nodes ran. Repeat the previous command to attempt a new run.
I have been able to resolve this error by updating the
kedro catalog
Copy code
def get_kedro_catalog():
    project_path = Path(__file__).resolve().parents[4]
    logger.info(f"Project path: {project_path}")
    bootstrap_project(project_path)
    with KedroSession.create(project_path=project_path) as session:
        context = session.load_context()
        catalog = context.catalog
    return catalog