Skip to content
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

Kedro cli command fails due to path conflicts #3694

Closed
lukas-al opened this issue Mar 11, 2024 · 4 comments
Closed

Kedro cli command fails due to path conflicts #3694

lukas-al opened this issue Mar 11, 2024 · 4 comments
Assignees
Labels
Community Issue/PR opened by the open-source community

Comments

@lukas-al
Copy link

Description

Kedro CLI fails on any command due to path inconsistencies in the main entry point.

Context

Was working on local machine, cloned the kedro project to an enterprise-managed computer and into a network attached storage folder.

The kedro command failed with a ValueError due to the source path not being relative to the project root. Editing the kedro/framework/cli.py file to call Path.cwd().resolve() fixed the error.

This might be due to the janky setup of our enterprise NAS system or some environment stuff I don't recognise. If that's the case, feel free to close.

Actual Result

Kedro CLI fails to init:

╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ C:\Miniconda3\envs\revisions_toolkit\lib\site-packages\kedro\framework\startup.py:136 in │
│ _validate_source_path │
│ │
│ C:\Miniconda3\envs\revisions_toolkit\lib\pathlib.py:818 in relative_to │
ValueError: '\\XXXX-XX\XXX\XXX\XXX\XXX\XXX\revisions-toolkit\src' is not in the subpath of 'X:\XXXX\XXX\XXX\XXX\revisions-toolkit' OR one path is relative and the other is absolute.

Your Environment

Code is on a network drive which is mapped to N:, but has a different fully resolved path.

  • Kedro version used (pip show kedro or kedro -V): 0.19.3
  • Python version used (python -V): 3.10.13
  • Operating system and version: Windows 10.0
@merelcht
Copy link
Member

Hi @lukas-al , thanks for reporting this issue. Just to clarify, this happens when you run any kedro command, such as kedro run? And from where are you running the command when you see this error?

@merelcht merelcht added the Community Issue/PR opened by the open-source community label Mar 14, 2024
@lukas-al
Copy link
Author

Hi,

Yes, this occurs when attempting to use any kedro cli command. I've tried running the following terminals:

  • Miniconda3 prompt cd /d
  • Command prompt cd /d
  • Powershell
  • All of the above but directly from vscode with the folder open.

I'm running the terminal in the correct location as they work when I apply the fix I described previously (editing the Path.cwd() with a .resolve())

@merelcht merelcht self-assigned this Mar 15, 2024
@noklam
Copy link
Contributor

noklam commented Mar 19, 2024

@lukas-al Do you think it may be related to #2346? If it's duplicate I prefer to close this since we are working on it.

@lukas-al
Copy link
Author

@lukas-al Do you think it may be related to #2346? If it's duplicate I prefer to close this since we are working on it.

Reading the other issue I suspect this is a duplicate. Happy to close.

@lukas-al lukas-al closed this as not planned Won't fix, can't repro, duplicate, stale Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Community Issue/PR opened by the open-source community
Projects
Archived in project
Development

No branches or pull requests

3 participants