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

Lite Viz isn't working #2231

Open
1 task
lordsoffallen opened this issue Jan 4, 2025 · 6 comments
Open
1 task

Lite Viz isn't working #2231

lordsoffallen opened this issue Jan 4, 2025 · 6 comments

Comments

@lordsoffallen
Copy link

Description

I am running uvx --with kedro-viz kedro viz run --lite in a project to visualize the nodes but it's throwing the following errors:

image

Context

Just trying to run the lite viz on my project.

Steps to Reproduce

Run the command above in a project.

Your Environment

Include as many relevant details as possible about the environment you experienced the bug in:

  • Web browser system and version:
  • Operating system and version: Ubuntu 20.04
  • NodeJS version used (if relevant): -
  • Kedro version used (if relevant): 0.19.10
  • Python version used (if relevant): 3.10.16

Checklist

  • Include labels so that we can categorise your issue
@lordsoffallen
Copy link
Author

Installed kedro-viz on my env and without --lite it's work as expected. Problem seems to --lite flag only

@rashidakanchwala
Copy link
Contributor

@ravi-kumar-pilla

@ravi-kumar-pilla
Copy link
Contributor

Hi @lordsoffallen ,

Thank you for raising the issue. Is it possible for you to give us a reproducible code snippet on which we can test and fix the issue. I am curious to know what were your import statements and dependencies (especially the file which has utf-8 dependency or related)

@lordsoffallen
Copy link
Author

@ravi-kumar-pilla Thanks, I would love to help but I have no idea where the problem is. This is a kedro project with many files inside. Is there like debug option that would output where the utf-8 errors are coming from? I don't know any file that i have that has something to do with utf-8. There are quite python in the project.

@ravi-kumar-pilla
Copy link
Contributor

ravi-kumar-pilla commented Jan 10, 2025

I see, Thanks for the response @lordsoffallen . As of now we do not have a debug option to give you a better debugging experience. Based on the error stack trace I think the error is being thrown when we are trying to open a file in the project. We have the below code at kedro_viz/integrations/kedro/lite_parser.py -

       with open(file_path, "r", encoding="utf-8") as file:
            file_content = file.read()

We can improve the error message to know exactly which file is causing the issue, but in the mean time if you would like to contribute, you can debug this file kedro_viz/integrations/kedro/lite_parser.py at parse function. Most probably the error is coming from here which tries to decode a file using UTF-8 encoding. If the file in your project has a different encoding, this will error out. Thank you

@lordsoffallen
Copy link
Author

I can debug but I still don't see how i can invoke this in my IDE. What I normally do is:

def test_preprocess(self, kedro_session):
    kedro_session.run(node_names=['preprocess'])

Which will just run a node, not idea how to invoke viz programatically so i can step into those lines. Would it be possible to add debug line logs (as it would help debug further issues in the future directly) and then I can upgrade and just enable debug logs? This is not urgent for me btw as without --lite flag, it works for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants