Hello :wave: I am having troubles debugging this e...
# questions
Hello 👋 I am having troubles debugging this error:
Copy code
File "/usr/local/lib/python3.10/dist-packages/kedro/framework/session/session.py", line 341, in run
    pipeline = pipelines[name]
  File "/usr/local/lib/python3.10/dist-packages/kedro/framework/project/__init__.py", line 142, in inner
  File "/usr/local/lib/python3.10/dist-packages/kedro/framework/project/__init__.py", line 187, in _load_data
    project_pipelines = register_pipelines()
TypeError: register_pipelines() missing 1 required positional argument: 'context'
I have two pipeline run scenarios: 1. I run
poetry run kedro run
from my local development environment: everything works as expected. 2. I run
poetry run kedro <our-plugin> run
, which shifts and lifts the pipeline into Vertex AI pipelines, where every pipeline run is composed of jobs and every job triggers
kedro run -e <env>--pipeline <pipeline> --nodes <node> --runner <runner>
: here is where I get the traceback as above. The plain Kedro library is used. Do you have any suggestion or hint?
Hey, Sorry to hear you're facing this error. could you please provide the following information Which version of Kedro are you using? Which version of Python are you using? Are there any differences in the environment setup between your local development environment and the Vertex AI environment?
👍🏼 1
Copy code
python = ">=3.10,<3.11.0"
kedro = "^0.19.5"
The differences in the environment setup are only related to Vertex AI configuration, not Kedro configuration—they are the same.
I'm curious whether you tried kedro-vertexai plugin and if it worked or not for you?
and the error suggests issue with
function - can you paste head of its definition here?
👍 1
@Artur Dobrogowski here is the function:
Copy code
def register_pipelines() -> Dict[str, Pipeline]:
    """Register the project's pipelines.

        A mapping from pipeline names to ``Pipeline`` objects.

    return find_pipelines()
That is why I don't get why it's asking for an argument that is not defined in its signature. I think the plugin is inspired from yours, though I've been using it for too little to know more about it. 🙂
Is the code for your plugin and/or project available somewhere public to investigate?
Looks like a weird error, I'd probably go debugger way to halt at this problematic line and look around why it expects register_pipelines to take kedro context, don't have any other ideas
👍 1
if you change that to
def register_pipelines(variable):
you could use a debugger to work out what’s being passed there?
if you search your project - that's the only function defined as register_pipelines? I'd make sure that:
Copy code
    def _get_pipelines_registry_callable(pipelines_module: str) -> Any:
        module_obj = importlib.import_module(pipelines_module)
        register_pipelines = getattr(module_obj, "register_pipelines")
        return register_pipelines

    def _load_data(self) -> None:
        """Lazily read pipelines defined in the pipelines registry module."""

        # If the pipelines dictionary has not been configured with a pipelines module
        # or if data has been loaded
        if self._pipelines_module is None or self._is_data_loaded:

        register_pipelines = self._get_pipelines_registry_callable(
        project_pipelines = register_pipelines()
points to the correct method
👍 1
@Ankita Katiyar not at the moment, unfortunately.