question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Kedro-viz displaying empty pipeline visualization

See original GitHub issue

Description

When I run kedro-viz from the command line, I get an error. I work with pyspark and python

Context

Can’t visualize kedro pipelines and datasets graph

Steps to Reproduce

I tried with two different kedro versions 4.0.0 and 4.3.1

Expected Result

Visualize the pipelines graph in the browser

Actual Result

I get the following errors

importlib; see the module's documentation for alternative uses
  from imp import load_source
Traceback (most recent call last):
  File "/Users/scarvajalg/PycharmProjects/data_engineering/venv/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 3250, in _wrap_pool_connect
    return fn()
  File "/Users/scarvajalg/PycharmProjects/data_engineering/venv/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 310, in connect
    return _ConnectionFairy._checkout(self)
  File "/Users/scarvajalg/PycharmProjects/data_engineering/venv/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 868, in _checkout
    fairy = _ConnectionRecord.checkout(pool)
  File "/Users/scarvajalg/PycharmProjects/data_engineering/venv/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 476, in checkout
    rec = pool._do_get()
  File "/Users/scarvajalg/PycharmProjects/data_engineering/venv/lib/python3.8/site-packages/sqlalchemy/pool/impl.py", line 256, in _do_get
    return self._create_connection()
  File "/Users/scarvajalg/PycharmProjects/data_engineering/venv/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 256, in _create_connection
    return _ConnectionRecord(self)
  File "/Users/scarvajalg/PycharmProjects/data_engineering/venv/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 371, in __init__
    self.__connect()
  File "/Users/scarvajalg/PycharmProjects/data_engineering/venv/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 666, in __connect
    pool.logger.debug("Error on connect(): %s", e)
  File "/Users/scarvajalg/PycharmProjects/data_engineering/venv/lib/python3.8/site-packages/sqlalchemy/util/langhelpers.py", line 70, in __exit__
    compat.raise_(
  File "/Users/scarvajalg/PycharmProjects/data_engineering/venv/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 207, in raise_
    raise exception
  File "/Users/scarvajalg/PycharmProjects/data_engineering/venv/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 661, in __connect
    self.dbapi_connection = connection = pool._invoke_creator(self)
  File "/Users/scarvajalg/PycharmProjects/data_engineering/venv/lib/python3.8/site-packages/sqlalchemy/engine/create.py", line 590, in connect
    return dialect.connect(*cargs, **cparams)
  File "/Users/scarvajalg/PycharmProjects/data_engineering/venv/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 597, in connect
    return self.dbapi.connect(*cargs, **cparams)
sqlite3.OperationalError: unable to open database file
The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/scarvajalg/PycharmProjects/data_engineering/venv/lib/python3.8/site-packages/kedro_viz/launchers/cli.py", line 129, in viz
    run_server(**run_server_kwargs)
  File "/Users/scarvajalg/PycharmProjects/data_engineering/venv/lib/python3.8/site-packages/kedro_viz/server.py", line 110, in run_server
    populate_data(data_access_manager, catalog, pipelines, session_store_location)
  File "/Users/scarvajalg/PycharmProjects/data_engineering/venv/lib/python3.8/site-packages/kedro_viz/server.py", line 65, in populate_data
    Base.metadata.create_all(bind=database_engine)
  File "/Users/scarvajalg/PycharmProjects/data_engineering/venv/lib/python3.8/site-packages/sqlalchemy/sql/schema.py", line 4785, in create_all
    bind._run_ddl_visitor(
  File "/Users/scarvajalg/PycharmProjects/data_engineering/venv/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 3116, in _run_ddl_visitor
    with self.begin() as conn:
  File "/Users/scarvajalg/PycharmProjects/data_engineering/venv/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 3032, in begin
    conn = self.connect(close_with_result=close_with_result)
  File "/Users/scarvajalg/PycharmProjects/data_engineering/venv/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 3204, in connect
    return self._connection_cls(self, close_with_result=close_with_result)
  File "/Users/scarvajalg/PycharmProjects/data_engineering/venv/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 96, in __init__
    else engine.raw_connection()
  File "/Users/scarvajalg/PycharmProjects/data_engineering/venv/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 3283, in raw_connection
    return self._wrap_pool_connect(self.pool.connect, _connection)
  File "/Users/scarvajalg/PycharmProjects/data_engineering/venv/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 3253, in _wrap_pool_connect
    Connection._handle_dbapi_exception_noconnection(
  File "/Users/scarvajalg/PycharmProjects/data_engineering/venv/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 2100, in _handle_dbapi_exception_noconnection
    util.raise_(
  File "/Users/scarvajalg/PycharmProjects/data_engineering/venv/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 207, in raise_
    raise exception
  File "/Users/scarvajalg/PycharmProjects/data_engineering/venv/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 3250, in _wrap_pool_connect
    return fn()
  File "/Users/scarvajalg/PycharmProjects/data_engineering/venv/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 310, in connect
    return _ConnectionFairy._checkout(self)
  File "/Users/scarvajalg/PycharmProjects/data_engineering/venv/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 868, in _checkout
    fairy = _ConnectionRecord.checkout(pool)
  File "/Users/scarvajalg/PycharmProjects/data_engineering/venv/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 476, in checkout
    rec = pool._do_get()
  File "/Users/scarvajalg/PycharmProjects/data_engineering/venv/lib/python3.8/site-packages/sqlalchemy/pool/impl.py", line 256, in _do_get
    return self._create_connection()
  File "/Users/scarvajalg/PycharmProjects/data_engineering/venv/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 256, in _create_connection
    return _ConnectionRecord(self)
  File "/Users/scarvajalg/PycharmProjects/data_engineering/venv/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 371, in __init__
    self.__connect()
  File "/Users/scarvajalg/PycharmProjects/data_engineering/venv/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 666, in __connect
    pool.logger.debug("Error on connect(): %s", e)
  File "/Users/scarvajalg/PycharmProjects/data_engineering/venv/lib/python3.8/site-packages/sqlalchemy/util/langhelpers.py", line 70, in __exit__
    compat.raise_(
  File "/Users/scarvajalg/PycharmProjects/data_engineering/venv/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 207, in raise_
    raise exception
  File "/Users/scarvajalg/PycharmProjects/data_engineering/venv/lib/python3.8/site-packages/sqlalchemy/pool/base.py", line 661, in __connect
    self.dbapi_connection = connection = pool._invoke_creator(self)
  File "/Users/scarvajalg/PycharmProjects/data_engineering/venv/lib/python3.8/site-packages/sqlalchemy/engine/create.py", line 590, in connect
    return dialect.connect(*cargs, **cparams)
  File "/Users/scarvajalg/PycharmProjects/data_engineering/venv/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 597, in connect
    return self.dbapi.connect(*cargs, **cparams)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) unable to open database file
(Background on this error at: https://sqlalche.me/e/14/e3q8)
kedro.framework.cli.utils.KedroCliError: (sqlite3.OperationalError) unable to open database file
(Background on this error at: https://sqlalche.me/e/14/e3q8)
Run with --verbose to see the full exception
Error: (sqlite3.OperationalError) unable to open database file
(Background on this error at: https://sqlalche.me/e/14/e3q8)

Your Environment

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

  • Web browser system and version: Google Chrome 96.0.4664.110
  • Operating system and version: MacOS Monterrey 12.2.1
  • NodeJS version used (if relevant):
  • Kedro version used (if relevant): 0.17.6
  • Python version used (if relevant): 3.8.12
  • Spark version used: 3.2.1
  • Scala version used: 2.12.15
  • Java version used: 1.8.0_321

Checklist

  • visualization

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:23 (13 by maintainers)

github_iconTop GitHub Comments

2reactions
AntonyMilneQBcommented, Mar 28, 2022

Excellent, thanks very much for letting us know. This fix will be included in the next release of kedro-viz, so when that is released you should just be able to pip install kedro-viz==4.3.2 and all will be good.

2reactions
jw-cpnetcommented, Mar 28, 2022

Thank you! @AntonyMilneQB

The fix works perfectly! And yes, kedro viz (before fixing) without pipeline argument works too.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Get started with Kedro-Viz - Read the Docs
Kedro -Viz is a key part of Kedro. It displays data and nodes, and the connections between them, to visualise the structure of...
Read more >
Visualising different environments on Kedro-Viz #58 - GitHub
Description I am creating my kedro pipelines dynamically from a custom JSON file which is part of my configuration per environment.
Read more >
Building Data Pipelines with Kedro - Ben Hayes
Just by running the kedro viz command, you can generate a visual representation of your pipeline. You'll notice you can interact with the ......
Read more >
kedro-viz - PyPI
See how your datasets and Python functions (nodes) are resolved in Kedro so that you can understand how your data pipeline is built...
Read more >
Towards a Modular Future: Reimagining and Rebuilding ...
With this paradigm shift comes the need to reimagine the visualization of the pipeline on Kedro-viz, in that it needs to introduce a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found